0

I have written a new JavaFX 11 project. This project is modular and uses JavaFX 11 & JDK 11 too. It doesn't include any build tools such as Maven or Gradle or something else. Now the project has been completed and I'm trying to package it as an executable application for Windows platform (.exe file with dependencies). Anybody could help me with the solution or documentation references??

Amir Victor
  • 181
  • 1
  • 7

1 Answers1

0

The first question is why do you start a new project based on the outdated Java 11 and even worse JavaFX 11? The current version of Java is 13 (and 14/15 already availabe as EA releases) and the current JavaFX version is also 13 (and 14 as EA). If it absolutely has to be Java 11 you can still combine that with the latest JavaFX release. So, 11/13 or even 11/14 would be ok.

In order to answer your question: If you were willing to switch to Java 14 you could directly use the new jpackage tool which is included in this release to build an exe and because your project is modular it would be just calling a single command.

mipa
  • 10,369
  • 2
  • 16
  • 35
  • 2
    I use Oracle JDK 11 because that's the latest LTS version of Java. – Amir Victor Feb 07 '20 at 09:51
  • Ok, and what exactly does that buy you? But besides that, this does not prevent you from using the latest JavaFX and it also does not prevent you from using Java 14 to get access to the new jpackage tool. – mipa Feb 07 '20 at 11:37