2

I was using NetBeans with jdk-1.8.0 to compile JavaFX-based files for a desktop application. Now I have updated to jdk-12.0.2 and I need to make JAR files from those Java files without NetBeans. I found that "jdk-12.0.2/lib" does not contain "ant-javafx.jar" also. Oracle documentaion states about jdk-1.8.0-based JavaFX handling. I am confused.

I appreciate any help so that I may make JAR file in commandline (with the manifest file) in jdk-12.0.2 in ubuntu. Thanks a lot.

0009laH
  • 1,960
  • 13
  • 27
vega
  • 89
  • 1
  • 10
  • May help you: https://openjfx.io/openjfx-docs/ – Slaw Sep 10 '19 at 17:08
  • @Slaw Thanks for the info. I did not know that Javafx is now separate and working through gluon project. That means if someone takes my javafx based code in other laboratory then (s)he has to load javafx separately to run my code? – vega Sep 10 '19 at 19:13
  • Yes, if using OracleJDK or OpenJDK one would need to pull in the JavaFX libraries just like any other dependency. Other distributors (e.g. [Zulu Community™](https://www.azul.com/downloads/zulu-community/)) may offer JDK packages that also include the OpenJFX libraries. Note that some of the JavaFX modules (e.g. `javafx.graphics`) have platform-specific native code. – Slaw Sep 10 '19 at 19:57
  • Note for _development_, if your project uses a build tool such as Maven or Gradle then pulling in dependencies is vastly simplified. For _deployment_, however, you'll have to ship the JavaFX libraries with your application. There are different ways to do this; both [this Q&A](https://stackoverflow.com/questions/53453212/how-to-deploy-a-javafx-11-desktop-application-with-a-jre) and [this Q&A](https://stackoverflow.com/questions/54063041/package-a-non-modular-javafx-application?) give more details (also browse both Q&A's linked questions). – Slaw Sep 10 '19 at 20:00
  • @Slaw, thank you very much for your clear explanation. – vega Sep 11 '19 at 16:32

0 Answers0