Launch4J doesn't accept Java 9 JDK
Brought to you by:
grzegok
I have a Java 8 JDK and Java 9 JDK installed (no "public JRE"!)
JAVA_HOME points to the Java 8 JDK
The PATH is setup to include the Java 8 JDK
launch4j.exe complains that "This application requires a Java Runtime Environment 1.6.0 - 1.8.9
Running "java -jar launch4j.jar" works.
An EXE generated with Launch4J shows the same behaviour: even though Java 8 is available on the path and through JAVA_HOME, the generated exe still complains that no Java 1.8.0 runtime environment could be found.
Noe that for some strange reason only the Java 9 JDK is visible in the Windows registry under HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\JDK
I am using launch4j 3.11 on Windows 10
When using the debug option of Launch4j it seems obvious where this goes wrong:
When using a Java 9 JDK there is no "JRE" subfolder anymore.
Launch4J needs to check HOMEDIR\bin\javaw.exe instead of HOMEDIR\jre\bin\javaw.exe if a Java 9 JDK is detected