skip to Main Content

I’ve build executable jar using NetBeans IDE 11.0 but when I open jar using :

hemlata@hemlata-pc:~/NetBeansProjects/Sizing/dist$ java -jar Sizing.jar 

I’m getting

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

I’m using OpenJDK 11 and OpenJFX 11 on Debian 10

I’ve added modules in vm option

--module-path /usr/lib/jvm/openjfx11/lib/ --add-modules javafx.controls,javafx.fxml  

But this is not problem.

So how to configure JavaFX runtime components that are missing?

2

Answers


  1. I think the VM arguments are the problem because they are only added when executing your project from within the IDE.

    If you build an executable jar from your project the VM arguments are not exported (because they are set in the command line and can’t be exported like this).

    If you change the command to start the jar like this it should work:

    java -jar Sizing.jar --module-path /usr/lib/jvm/openjfx11/lib/ --add-modules javafx.controls,javafx.fxml  
    
    Login or Signup to reply.
  2. I still wonder why Oracle removed JavaFX from the Java distribution and made life for us JavaFX developers such a pain.

    But I would recommend to use the Java distributions from Bell soft these distributions have JavaFX included and work out of the box.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search