After running a JavaFX 2.0 application the following is displayed in the console:
Exception in thread "main" java.lang.NoClassDefFoundError: javafx/application/application
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(Unknown Source)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$000(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at org.nick.addressbook.AddressBook.main(AddressBook.java:8)
Caused by: java.lang.ClassNotFoundException: javafx.application.Application
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 13 more
The NoClassDefFoundError occurs on this line below:
Launcher.launch(Lifecycle.class, null);
This problem did not occur with an earlier build of JavaFX 2 (build 13). In the manifest jfxrt.jar is included in the class-path property, and the required file does contain the required class file. If the file wasn't referenced then a different error would be occuring. I have noticed that the size of jfxrt.jar in both JavaFX builds (13 and 17) is exactly the same, is that supposed to be the case?
Exception in thread "main" java.lang.NoClassDefFoundError: javafx/application/application
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(Unknown Source)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$000(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at org.nick.addressbook.AddressBook.main(AddressBook.java:8)
Caused by: java.lang.ClassNotFoundException: javafx.application.Application
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 13 more
The NoClassDefFoundError occurs on this line below:
Launcher.launch(Lifecycle.class, null);
This problem did not occur with an earlier build of JavaFX 2 (build 13). In the manifest jfxrt.jar is included in the class-path property, and the required file does contain the required class file. If the file wasn't referenced then a different error would be occuring. I have noticed that the size of jfxrt.jar in both JavaFX builds (13 and 17) is exactly the same, is that supposed to be the case?
- relates to
-
JDK-8113667 Application Class Fails To Launch JavaFX 2 Application
- Closed