JavaFX Exception in thread “main” java.lang.NoClassDefFoundError: javafx/application/Application

前端 未结 11 1260
半阙折子戏
半阙折子戏 2020-12-01 08:09

I\'m getting this error

Exception in thread \"main\" java.lang.NoClassDefFoundError: javafx/application/Ap
plication
        at java.lang.ClassLoader.defineC         


        
11条回答
  •  春和景丽
    2020-12-01 08:27

    If you are using netbeans like me and you have two versions of JDK installed, then you should change the classpath to the appropriate java installation in the config file. This is also a bug in Netbeans: There are two ways to do it:
    Either start NetBeans with --jdkhome by executing this:

    "C:\Program Files\NetBeans Dev 201402160001\bin\netbeans.exe" --jdkhome "C:\Program Files\Java\jdk1.7.0_51"
    

    Or set the "netbeans_jdkhome" property in /etc/netbeans.conf e.g.

    # Default location of JDK, can be overridden by using --jdkhome :
    netbeans_jdkhome="C:\Program Files\Java\jdk1.7.0_51"
    

提交回复
热议问题