Skip to content

A suitable of java could not be found on your system #150

@xukai59740

Description

@xukai59740

I'm submitting a…

  • bug report
  • feature request
  • other

Short description of the issue/suggestion:
SetupError - A suitable of java could not be found on your system when I run the application

Steps to reproduce the issue/enhancement:

  1. [ Build the exe install file ]
  2. [ Install success ]
  3. [ run the application ]
  4. [ get error dialog ]

What is the expected behavior?
it's normally worked

What is the current behavior?
can't find java runtime env when setup

Do you have outputs, screenshots, demos or samples which demonstrate the problem or enhancement?
this is config:

   ..........
   version = Platform.windows
   platform = currentPlatform
   mainClass = setup.mainClassName
   bundleJre = true
   customizedJre = false
   generateInstaller = true
   vmArgs = ["-Dprism.maxvram=512m -XX:+UseG1GC"]
   runnableJar = file("$buildDir/libs/desktop-uber.jar")
   copyDependencies = true
   administratorRequired = false
  winConfig {
      generateSetup = true
      generateMsi = true
      disableDirPage = false
      disableProgramGroupPage = false
      disableFinishedPage = false
      disableWelcomePage = true
      exeCreationTool = WindowsExeCreationTool.winrun4j
  }

this is build log:

Bundling JRE ... with D:\develop_env\openjdk-16.0.2_windows-x64_bin\jdk-16.0.2
     Creating customized JRE ...
     Getting required modules ... 
     Required modules found: [ALL-MODULE-PATH]
     
     Creating JRE with next modules included: ALL-MODULE-PATH
     Using D:\develop_env\openjdk-16.0.2_windows-x64_bin\jdk-16.0.2\jmods modules directory
     Executing command: cmd.exe /s /c "D:\develop_env\openjdk-16.0.2_windows-x64_bin\jdk-16.0.2\bin\jlink --module-path D:\develop_env\openjdk-16.0.2_windows-x64_bin\jdk-16.0.2\jmods --add-modules ALL-MODULE-PATH --output C:\Users\kk\IdeaProjects\demo\kotlin\desktop\build\MOST\jre --no-header-files --no-man-pages --strip-debug --compress=2"
     WARNING: Using incubator modules: jdk.incubator.vector, jdk.incubator.foreign
     Removing folder [C:\Users\kk\IdeaProjects\demo\kotlin\desktop\build\MOST\jre\legal]
 JRE bundled in C:\Users\kk\IdeaProjects\demo\kotlin\desktop\build\MOST\jre!
 

What is the motivation / use case for changing the behavior?
Update version 1.5.1 to 1.6.3, switch to winrun4j from launch4j

Please tell us about your environment:

  • JavaPackager version: 1.6.3
  • OS version: Win10 x64
  • JDK version: 16
  • Build tool:
    • Maven
    • Gradle

Other information (e.g. related issues, suggestions how to fix, links for us to have context)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions