1

I have download a jar file. When I run it, I get the message JavaFX runtime components are missing............ I then ran the the following command

sudo apt install openjdk-8-jdk openjfx

Still I am getting the same error.

I have Netbeans 8.1 installed but do not have problems in running sample JavaFX projects. On terminal if I echo $JAVA_HOME, it returns nothing.

The command Java -version return openjdk version 11.0.3 In netbean the platform is set to jdk 8.

So how do i make the externally downloaded jar file use the same jdk version and javafx as used by netbeans.

neelanshu
  • 331
  • I have since then run sudo apt install openjdk-11-jdk openjfx but still have the same problem – neelanshu Jul 14 '19 at 09:31
  • JavaFX is not included anymore in JDK 11. Download the javafx and then follow this link: https://stackoverflow.com/questions/52144931/how-to-add-javafx-runtime-to-eclipse-in-java-11 – kannzzmm2 Jul 14 '19 at 09:47
  • I am trying to make it work with openjdk 8, but no success. – neelanshu Jul 14 '19 at 13:14
  • what is the output of java -version ? – kannzzmm2 Jul 14 '19 at 13:28
  • It was showing version 11 so I purged openjdk*, then ran sudo apt install openjdk-8-jdk openjfx, java version was now 1.8....but was unable to run javafx program. I would like to add that Netbeans has a separate jdk 8 installed in a separate directory. – neelanshu Jul 15 '19 at 01:42
  • I used update alternatives to have java, javac, and javaws to point to the the directory where jdk1.8.0_74 had been installed for netbeans. Used the following link for guidance https://www3.ntu.edu.sg/home/ehchua/programming/howto/JDK_Howto.html – neelanshu Jul 15 '19 at 16:27

0 Answers0