nusCS2113-AY1819S1 / forum

5 stars 0 forks source link

JavaFX is not found error #100

Open r-farkhutdinov opened 6 years ago

r-farkhutdinov commented 6 years ago

After switching the OS it's impossible to run the project. Using the following version of JDK and Ubuntu:

openjdk version "10.0.2" 2018-07-17
OpenJDK Runtime Environment (build 10.0.2+13-Ubuntu-1ubuntu0.18.04.3)
OpenJDK 64-Bit Server VM (build 10.0.2+13-Ubuntu-1ubuntu0.18.04.3, mixed mode)

The error message:

Error: Could not find or load main class seedu.address.MainApp
Caused by: java.lang.NoClassDefFoundError: javafx/application/Application

Hopefully someone who had the same issue can help.

lekoook commented 6 years ago

I run the same configuration as you, albeit I ran Oracle JDK instead of OpenJDK.

Try running sudo apt install openjfx.

If that doesn't work, I suggest you uninstall OpenJDK completely and use Oracle JDK instead. Link to Oracle JDK.

Edit: If you want to install Oracle JDK through apt, there is a great tutorial here. Just scroll further down.