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 214386 - Can't run JavaFX in Swing Application on JDK7u6
Summary: Can't run JavaFX in Swing Application on JDK7u6
Status: VERIFIED FIXED
Alias: None
Product: javafx
Classification: Unclassified
Component: Project (show other bugs)
Version: 7.2
Hardware: PC Windows 7
: P1 normal (vote)
Assignee: Petr Somol
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-18 15:05 UTC by Stepan Zebra
Modified: 2012-07-19 11:31 UTC (History)
4 users (show)

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 Stepan Zebra 2012-06-18 15:05:21 UTC

    
Comment 1 Stepan Zebra 2012-06-18 15:12:29 UTC
Product Version: NetBeans IDE 7.2 RC1 (Build 201206141830)
Java: 1.7.0_06-ea; Java HotSpot(TM) 64-Bit Server VM 23.2-b05
System: Windows 7 version 6.1 running on amd64; Cp1252; en_US (nb)

With JDK7u6 with integrated FX 2.2, newly created JavaFX in Swing project fails to run standalone. It runs successfully with JDK7u5 with FX 2.1.1.

Output:
ava.lang.NoClassDefFoundError: javafx/embed/swing/JFXPanel
	at java.lang.Class.getDeclaredMethods0(Native Method)
	at java.lang.Class.privateGetDeclaredMethods(Class.java:2442)
	at java.lang.Class.getMethod0(Class.java:2685)
	at java.lang.Class.getMethod(Class.java:1620)
	at sun.launcher.LauncherHelper.getMainMethod(LauncherHelper.java:492)
	at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:484)
Caused by: java.lang.ClassNotFoundException: javafx.embed.swing.JFXPanel
	at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
	... 6 more
Exception in thread "main" Java Result: 1
Comment 2 Petr Somol 2012-06-19 09:51:10 UTC
The cause of this bug is outside NetBeans. I filed a report for it at
http://javafx-jira.kenai.com/browse/RT-22679
On NetBeans side we can only consider a possible workaround, that however might
have unintended consequenses. Adding Tomas to CC - please Tomas would you
comment?
Comment 3 Petr Somol 2012-06-20 10:27:12 UTC
after a discussion within our team we decided against the workaround due to its unavoidable negative consequences in SE projects. As the bug has been filed in Jira, I am closing as wontfix here.
Comment 4 David Strupl 2012-06-21 14:03:18 UTC
Removing the keyword.
Comment 5 Stepan Zebra 2012-07-16 15:47:49 UTC
Issue was closed as won't fix by both FX and JDK teams.

Please apply an alternative to using bootclasspath prepending in FX projects.
Comment 6 Petr Somol 2012-07-17 09:01:53 UTC
After a discussion on Monday we decided to add FX artifacts not to bootclasspath through endorsed.classpath project property but to classpath through javac.classpath property. This change had not been possible some time ago due to dependency on SE copylibs task, but this has been changed recently, opening the aforementioned option.

Adding FX artifacts to classpath instead to bootclasspath should resolve all 7u6 and 7u4Mac related problems. One negative effect of this solution nevertheless will appear; in the specific case when user creates any FX project in NB7.2+ and then opens it in NB7.1.2, the project will build correctly and run correctly, but it will inintentionally copy several FX jars to project's dist/lib subdir and in case of Run as Webstart it will list these in jnlp. This problem however will affect only this specific case of NB7.1.2, not any other 7.1.x nor 7.2+ version.

Fixed in jetmain:
http://hg.netbeans.org/jet-main/rev/6b8a7555cf9a
http://hg.netbeans.org/jet-main/rev/cc05c03e90ab
http://hg.netbeans.org/jet-main/rev/0f5c3be0aff1
Comment 8 Quality Engineering 2012-07-17 15:47:04 UTC
Integrated into 'releases', will be available in build *201207171143* or newer. Wait for official and publicly available build.
Changeset: http://hg.netbeans.org/releases/rev/83e5abc069e6
User: Petr Somol <psomol@netbeans.org>
Log: #214386 remove os=Windows modifier in FX-in-Swing jnlp templates
Comment 9 Quality Engineering 2012-07-18 03:12:08 UTC
Integrated into 'main-golden', will be available in build *201207180002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/6b8a7555cf9a
User: Petr Somol <psomol@netbeans.org>
Log: #214386 remove os=Windows modifier in FX-in-Swing jnlp templates
Comment 10 Stepan Zebra 2012-07-19 11:31:37 UTC
verified in 7.2