 <p>Do not reinvent the wheel. There is already a tool that creates an executable package. See the documentation of Oracle: <a href="https://docs.oracle.com/javase/8/docs/technotes/guides/deploy/self-contained-packaging.html" rel="nofollow">https://docs.oracle.com/javase/8/docs/technotes/guides/deploy/self-contained-packaging.html</a> With this you can create native bundles (.exe on Windows) for different OS. From the page mentioned:</p> <pre><code>javapackager -deploy -native -outdir packages -outfile BrickBreaker -srcdir dist -srcfiles BrickBreaker.jar -appclass brickbreaker.Main -name "BrickBreaker" -title "BrickBreaker demo" </code></pre> <p>The same can also be accomplished with an Ant task which might be easier to integrate. There is also the Maven plugin <a href="https://github.com/javafx-maven-plugin/javafx-maven-plugin" rel="nofollow">javax-maven-plugin</a>.</p>