-
Added a
--jre-path
option to theexe
task, allowing one to specify the path where Java is expected to be found on the end user's system.From my understanding, the launch4j default behavior is to locate Java via the Windows registry. However, there have been reported issues around some distributions of Java (e.g. AdoptOpenJDK 11) not adding the appropriate information to the registry, and apparently using whatever
java
is on thePATH
is not the default behavior of the executable emitted by launch4j.According to discussions here and here, you can configure launch4j to use
%JAVA_HOME%;%PATH%
in the<jre><path>...</path></jre>
part of the config file, and that will make it so that the executable will try to find Java via the paths specified in the%JAVA_HOME%
and%PATH%
Windows environment variables.You can now do this by specifying
--jre-path "%JAVA_HOME%;%PATH%"
in theexe
task options, and hopefully the executables you create will work if the end user has a distribution of Java that doesn't update the Windows registry appropriately.
- Both the
bin
andexe
tasks now take a--jvm-opt
flag for passing options to the Java launcher each time the executable is run.
-
exe
task produces standalone Windows executables (.exe files) from jars, using Launch4j. -
Task names shortened (
jar2bin -> bin, jar2exe -> exe
) for the sake of simplicity.
- Initial release.
jar2bin
task produces standalone Unix/Linux executables.