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

后端 未结 4 675
别那么骄傲
别那么骄傲 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条回答
  •  感情败类
    2020-12-29 01:41

    In Eclipse : run configurations -> arguments -> VM arguments :

    --module-path ${project_classpath:REPLACE_ME_WITH_YOUR_PROJECT_NAME} 
    
    --add-modules javafx.controls,javafx.fxml
    

提交回复
热议问题