1

I'm trying to build a standalone .jar using Intellij that includes JavaFX, however I get following error when trying to run it. .

Error: JavaFX runtime components are missing, and are required to run this application

I've followed the advice from this question Trying to run executable jar of JavaFX app - Error: JavaFX runtime components are missing and I can run the jar successfully. But I'd like to be able to run it without needing to specify the VM arguments if possible (so it works on a different PC).

So my question is is it possible to include the JavaFX classes in the .jar file so I can run this application anywhere that has java installed? Or am I going to need to install JavaFX then make a script to run the .jar with the correct VM arguments pointing to JavaFX?

I'm not using a build system such as gradle or maven with this project, I'm downloading the JavaFX files and including them as libraries from Intellij.

Screenshot of my project structure

Mederer
  • 13
  • 4
  • As far as I know, your client computers would need the Java runtime installed, along with JavaFX, in order for the JAR to "just work." – Zephyr Jan 23 '19 at 04:04

0 Answers0