Menu

#177 Launch4J doesn't accept Java 9 JDK

3.x
closed-fixed
None
5
2018-05-12
2017-11-28
TomK
No

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

Discussion

  • TomK

    TomK - 2017-11-28

    When using the debug option of Launch4j it seems obvious where this goes wrong:

    Java min ver:   1.8.0
    Java max ver:   
    64-bit search:  SOFTWARE\JavaSoft\Java Runtime Environment...
    32-bit search:  SOFTWARE\JavaSoft\Java Runtime Environment...
    64-bit search:  SOFTWARE\JavaSoft\Java Development Kit...
    32-bit search:  SOFTWARE\JavaSoft\Java Development Kit...
    64-bit search:  SOFTWARE\JavaSoft\JRE...
    32-bit search:  SOFTWARE\JavaSoft\JRE...
    64-bit search:  SOFTWARE\JavaSoft\JDK...
    Check:      SOFTWARE\JavaSoft\JDK\9
    Check launcher: C:\etc\Java9\jre\bin\javaw.exe (not found)
    Ignore:     9
    

    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

     
  • Grzegorz Kowal

    Grzegorz Kowal - 2018-05-12
    • assigned_to: Grzegorz Kowal
     
  • Grzegorz Kowal

    Grzegorz Kowal - 2018-05-12
    • status: open --> closed-fixed
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.