Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 116258 - Cannot run JavaFX application outside of NetBeans
Cannot run JavaFX application outside of NetBeans
Product: javafx
Classification: Unclassified
Component: Unsupported
PC Windows XP
: P1 (vote)
: 6.x
Assigned To: Alexey Butenko
Depends on:
  Show dependency treegraph
Reported: 2007-09-21 07:40 UTC by Jaromir Uhrik
Modified: 2007-10-18 11:08 UTC (History)
0 users

See Also:
Issue Type: DEFECT


Note You need to log in before you can comment on or make changes to this bug.
Description Jaromir Uhrik 2007-09-21 07:40:13 UTC
Product Version: NetBeans IDE 6.0 Beta 1 (Build 200709141330) 
Java: 1.7.0-ea; Java HotSpot(TM) Client VM 1.7.0-ea-b15 
System: Windows XP version 5.1 running on x86; Cp1252; en_US (nb)

Steps to reproduce:
1.Install JavaFX from NetBeans Update Center for 6.0Beat1 through Plugin Manager (Tools|Plugins)
2.Create JavaFX project
3.Edit the Main.fx to contain following
package javafxapplication1;
import javafx.ui.*;
     Frame {
            title: "Hello World JavaFX"
            width: 200
            height: 50
            content: Label {
                text: "Hello World"
            visible: true
4.Run project by F6 - the Hello sample window appears and the console contains the following snippet:
To run this application from the command line without Ant, try:
java -jar "C:\My Documents\NetBeansProjects\JavaFXApplication1\dist\JavaFXApplication1.jar"
5.Execute recommended command in console outside IDE
-> It ends without success and following exception appears:
java -jar "C:\My Documents\NetBeansProjects\JavaFXApplication1\dist\JavaFXApplication1.jar"
Exception in thread "main" java.lang.NoClassDefFoundError: javafxapplication1/Main
Caused by: java.lang.ClassNotFoundException: javafxapplication1.Main
        at$ Source)
        at Method)
        at Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClassInternal(Unknown Source)
Comment 1 Alexei Mokeev 2007-09-25 15:29:38 UTC
Accepted. The comment in the output is incorrect and provides users with wrong instructions on how to run the app
outside of netbeans.
We are evaluating the possible ways of fixing - it will be done either via update of module on update center or for Beta2
Comment 2 Alexey Butenko 2007-09-26 10:50:01 UTC
Fixed in trunk:
To run application from command line, type following command:
java -jar "<Application Jar>" <Main FX class>
Comment 3 Alexandr Scherbatiy 2007-10-18 11:08:45 UTC

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