This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 239927 - Running NB on JDK 8, JavaFX apps targeting Java 7 with JavaFX 2.2 fail to run
Summary: Running NB on JDK 8, JavaFX apps targeting Java 7 with JavaFX 2.2 fail to run
Status: VERIFIED DUPLICATE of bug 239388
Alias: None
Product: javafx
Classification: Unclassified
Component: Platform (show other bugs)
Version: 8.0
Hardware: PC Windows 7
: P1 normal (vote)
Assignee: Tomas Zezula
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-01-02 15:19 UTC by swpalmer
Modified: 2014-02-13 06:00 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


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 ***