#70 JRE/Java search sequence

launch4j 3.8
General (39)


I am using launch4j to wrapp my jar file to an exe. But when i execute the wrapped exe, it always seraches for
1. java path from the bundled jre path configured in the launch4j UI.
2. and then it searches for JAVA_HOME
It would be great if we can change this search sequence. it would be really good if we can configure the search sequence from the UI so that a userdefined serch sequence is followed.



  • istvanc

    istvanc - 2013-08-06


    I also need this functionality.
    My use case is:
    I have a java aplication that is basically an image viewer. When the user exports images we write to the CD/DVD not only the images but also our small image viewer java application. We use launch4j to create an executable file and we use a bundled JRE in order to not bother the user to download/instal JRE on the system he is viewing the images from the CD/DVD
    My problem is that if our viewer is using the bundled JRE from the CD the aplication is starting up really slowly compared to the startup in case of using the JRE from the system.
    I would like to have a way to specify in the launch4j config file that the preffered JRE is the system JRE and if there is no JRE instaled than use the bundled JRE. (maybe using the jdkPreference xml tag or by any modality to somehow alter the search sequence).


  • Grzegorz Kowal

    Grzegorz Kowal - 2014-03-27
    • Group: --> Next Release
    • Priority: 5 --> 7
  • Robert P

    Robert P - 2014-09-26

    I also would really appreciate this feature.
    My use case is similar to the one of istvanc, only that my application is not residing on a CD but on the network. Being able to prefer the local JRE to the one from the network would speed up starting the application a lot.

  • Grzegorz Kowal

    Grzegorz Kowal - 2015-01-03

    Implemented in 3.6.

  • Grzegorz Kowal

    Grzegorz Kowal - 2015-01-03
    • status: open --> closed
  • Grzegorz Kowal

    Grzegorz Kowal - 2015-05-09
    • Group: Future --> launch4j 3.8

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks