简体   繁体   中英

Is there a way to make Launch4j 3.12 use a bundled OpenJDK instead of Oracle JRE?

I am using Launch4j 3.12 to create a launcher for a jar (using launch4jc.exe from the command line) and then NSIS to create an installer that also bundles OpenJDK in the installer.

The problem is Launch4j needs Oracle JRE installed on the PC to be able to run. Is there a command line argument to tell Launch4j to use OpenJDK installed at a custom location, so that I don't need to have Oracle JRE installed on my PC?

I am not using any fancy command line arguments for the installer creation, it's just:

launch4jc.exe launcher-config.xml

And the error I get is this:

launch4j: This application requires a Java Runtime Environment 1.6.0 - 1.8.9

Yes, you should be able to use OpenJDK as bundled runtime, but you are using methods that are available only in normal Java. Also you have to download OpenJDK from its site: https://openjdk.java.net/install/ Don't forget change normal java library for a OpenJDK library.

It is not possible, but as long as you use this program you must install oracle JRE. I hope your problem is resolved

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM