Search for JavaFX and include in classpath

Luis K
  • Luis K

    Luis K - 2013-07-09

    Launch4J is really awesome!
    I know that with JavaFX you can generate a launcher with an ant task, but I was willing to keep using Launch4J.
    My app uses Swing and I'm starting to include some JavaFX components, but the problem is that I must include the jfxrt.jar to the classpath but it could be in many different places.
    Starting with Java 7u6, the JavaFX is installed with the JRE.
    It would be really nice if Launch4J could also look for JavaFX and include the required libraries to the classpath.
    Luis Fernando

  • Olive

    Olive - 2014-04-15


    I have the same question.
    I cannot figure out how to include jfxrt.jar in the classpath.

    The only dirty workaround is to add:

    <!-- JRE (>1.7.0_06) -->
    <!-- JDK (>1.7.0_06) -->

    However, this relies on the facts that:

    • the system has JAVA_HOME environment variable, and
    • JAVA_HOME points to the same JRE/JDK location as the one detected by Launch4j

    This is too unreliable.

    Is there a variable to know the JRE location that Launch4j uses at runtime?


  • Olive

    Olive - 2014-04-15

    It seems that Feature Request #61 would answer my requirement...

  • Grzegorz Kowal

    Grzegorz Kowal - 2014-04-15


    I changed the priority of that feature request, planned for next release.


  • Olive

    Olive - 2014-04-16

    Thanks Grzegorz!

    I tried the patch from feature request #61 and can confirm that it works.

    Waiting for next release!


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

Sign up for the SourceForge newsletter:

No, thanks