Search code examples
javawindowsfxml

How to convert a java fxml file into exe for windows with/with out jre


Hello I have made a sw in java with help of scene builder. Now before I give it to the Clint I want it as a single exe. Which willl install the sw in a specific folder. My app will generate some .ser files for storage purpose. Most of what I tried so far only generate exe files which works only when java is present in the system. Can someone help me with this thank you


Solution

  • To make an .exe installer for a Java application, use the jpackage tool that comes with recent JDKs.

    See https://docs.oracle.com/en/java/javase/14/docs/specs/man/jpackage.html

    It will also bundle the JRE so everything is self-contained. This is actually the preferred way to distribute Java applications. jpackage can use the jlink tool to make a stripped down JRE, or you can provide a JRE image that you have already created (with jlink).