Error: Could not find or load main class application.Main Caused by: java.lang.NoClassDefFoundError: javafx/application/Application JDK 11

后端 未结 4 677
别那么骄傲
别那么骄傲 2020-12-29 00:51

I am stuck at a very basic problem. I have created a simple hello world program using JavaFX which works fine on JDK 1.8. But when I switch to JDK-11 it throws following exc

4条回答
  •  Happy的楠姐
    2020-12-29 01:23

    I had a similar error when executing a java application, I could not find some packages already installed, I located the path where the application was reading and there I added a symbolic link to the javafx library that I had installed.

    Example:

    user@server:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib$ sudo ln -s /usr/share/openjfx/lib/javafx.properties
    

提交回复
热议问题