Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8112660

No Class File Found For Application Even Though It Exists

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: fx2.0
    • Component/s: deploy
    • Labels:
      None
    • Environment:

      Windows XP, JDK 6u24, JavaFX 2 (build 17), Visage

      Description

      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?

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              ngthomas Thomas Ng (Inactive)
              Reporter:
              napperleyjfx Nick Apperley (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported: