0

Hi

Working on a JavaFX application with IntelliJ. I have been publishing releases on the Github page till now but I noticed yesterday that none of them work without JDK as a dependency. I found the term "self-contained jar file" after a quick Google search and heard of Ant Build, Maven and Gradle could do just that. Ant Build didn't work, Maven I couldn't get to work and Gradle kind of overwhelmed me with options. There is no project alike, so there wasn't a universal script to do what I want, so I have to make my own it said on most docs. So here I am.

My question is; how do I compile my IntelliJ project in native Java with JavaFX to a self-contained jar file?

Simon
  • 95
  • 1
  • 11
  • See [How to open JavaFX .jar file with JDK 11?](https://stackoverflow.com/questions/53533486), [JavaFX 11 : Create a jar file with Gradle](https://stackoverflow.com/questions/52569724), and [JAR File Creation in JDK 11 and JavaFx](https://stackoverflow.com/questions/53638371). The first question gives an answer only using IntelliJ. – Slaw Feb 25 '19 at 18:11

1 Answers1

0

Take a look at Launch4j, it allows you to specify a JRE to bundle when creating an EXE file. Unfortunately, I do not think it supports MacOS or Linux platforms.

It also has fairly in-depth command line options, so it can be automated in a build process using batch files, maven, etc..

Dylan
  • 1,335
  • 8
  • 21