I\'m getting this error
Exception in thread \"main\" java.lang.NoClassDefFoundError: javafx/application/Ap
plication
at java.lang.ClassLoader.defineC
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"