javajava-8java-13

How to run java applications JDK13 on JRE?


I have made an a java app with JDK 13. I created a exe file with launch4j. But nobody can run it because everyone has the jre 1.8 version and it wont start... I has to include the java jdk 13 with installation and set the java_home with that ?


Solution

  • TL;DR - If you want to distribute a Java 13 application, the best option is to use jlink to create the executable. This avoids the user having to install any JDK or JRE to run your code.


    Clearly, users cannot run your application with a Java 8 JRE or JDK. A typical Java 13 application will make use of features that are not present in the Java 8 platform. But even if it worked, free Java 8 will be end-of-life in April 2021, and at that point:

    But Java 13 is problematic too. That will be end-of life in September 2020! And besides, JRE distributions are no longer available.

    Finally, application installers with embedded JREs were always somewhat problematic:


    The best approach will be to do the following:

    If you don't want use jlink, another alternative would be to develop your code to run on Java LTS releases. (The current LTS release is Java 11, and the next one will be Java 17 which is planned for September 2021.)