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 116258 - Cannot run JavaFX application outside of NetBeans
Summary: Cannot run JavaFX application outside of NetBeans
Status: VERIFIED FIXED
Alias: None
Product: javafx
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P1 blocker (vote)
Assignee: Alexey Butenko
URL:
Keywords:
Depends on:
Blocks:
 
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
Exception Reporter:


Attachments

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