Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
Bug 239927 - Running NB on JDK 8, JavaFX apps targeting Java 7 with JavaFX 2.2 fail to run
Running NB on JDK 8, JavaFX apps targeting Java 7 with JavaFX 2.2 fail to run
Status: VERIFIED DUPLICATE of bug 239388
Product: javafx
Classification: Unclassified
Component: Platform
8.0
PC Windows 7
: P1 (vote)
: TBD
Assigned To: Tomas Zezula
issues@javafx
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-01-02 15:19 UTC by swpalmer
Modified: 2014-02-13 06:00 UTC (History)
0 users

See Also:
Issue Type: DEFECT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description swpalmer 2014-01-02 15:19:39 UTC
Product Version = NetBeans IDE Dev (Build 201312300942)
Operating System = Windows 7 version 6.1 running on amd64
Java; VM; Vendor = 1.8.0-ea
Runtime = Java HotSpot(TM) 64-Bit Server VM 25.0-b63

Install NB with JDK 8 as the default platform. Also install JDK 7u45.
Create a new JavaFX application.
Keep default "Hello World" app.
Compile and run -> success.
Change the Java Platform for the project from the default to JDK 7u45 (adding it as a Java Platform if needed).
Compile and run the application. 
Result:

Exception in thread "main" java.lang.NoClassDefFoundError: javafx/application/Application
        at java.lang.ClassLoader.defineClass1(Native Method)
        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$100(Unknown Source)
        at java.net.URLClassLoader$1.run(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 sun.launcher.LauncherHelper.checkAndLoadMain(Unknown Source)
Caused by: java.lang.ClassNotFoundException: javafx.application.Application
        at java.net.URLClassLoader$1.run(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)
        ... 13 more

The application is incorrectly packaged and does not augment the classpath with the JavaFX runtime.
Comment 1 Roman Svitanic 2014-01-06 16:02:21 UTC
This has been already reported. Please try to browse existing issues before filing new one. Thanks!

*** This bug has been marked as a duplicate of bug 239388 ***


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo