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 239957 - Cannot run profile project/run file/debug file/profile file in javafx mvn application
Summary: Cannot run profile project/run file/debug file/profile file in javafx mvn app...
Status: NEW
Alias: None
Product: javafx
Classification: Unclassified
Component: Project (show other bugs)
Version: 7.4
Hardware: PC Mac OS X
: P3 normal with 3 votes (vote)
Assignee: Roman Svitanic
URL:
Keywords:
: 240141 248227 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-01-03 13:33 UTC by Tomas Danek
Modified: 2014-10-29 09:39 UTC (History)
4 users (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tomas Danek 2014-01-03 13:33:17 UTC
Product Version: NetBeans IDE 7.4 (Build 201310111528)
Updates: NetBeans IDE is updated to version NetBeans 7.4 Patch 2
Java: 1.7.0_51; Java HotSpot(TM) 64-Bit Server VM 24.51-b03
Runtime: Java(TM) SE Runtime Environment 1.7.0_51-b13
System: Mac OS X version 10.9.1 running on x86_64; UTF-8; en_US (nb)
User directory: /Users/tomas/Library/Application Support/NetBeans/7.4
Cache directory: /Users/tomas/Library/Caches/NetBeans/7.4
---------------
- create simple maven javafx application
- clean and build
- run on project -> works
- debug on project -> works
- profile on project -> fails
- run on file -> fails
- debug on file -> fails
- profile on file -> fails

stacktrace with failure looks like:
--- exec-maven-plugin:1.2.1:exec (default-cli) @ javafx ---
Exception in thread "main" java.lang.NoClassDefFoundError: javafx/application/Application
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
	at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
	at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
	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:425)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
	at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:482)
Caused by: java.lang.ClassNotFoundException: javafx.application.Application
	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:425)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
	... 13 more
------------------------------------------------------------------------
BUILD FAILURE


..seems to be caused by missing jfxrt.jar on cp.
Comment 1 Milos Kleint 2014-01-03 15:00:29 UTC
were this action *ever* implemented? javafx story on maven is bad because there's no standard way of simply running javafx apps. Until there is the support will be limited in scope
Comment 2 Roman Svitanic 2014-01-03 15:54:34 UTC
(In reply to Milos Kleint from comment #1)
> were this action *ever* implemented? javafx story on maven is bad because
> there's no standard way of simply running javafx apps. Until there is the
> support will be limited in scope

These actions weren't implemented for JavaFX on Maven.

Profiling of the project could be implemented probably in the same way as debugging (profile action in nbactions & set agentpath).

Regarding the actions on the files: Running of JavaFX application requires JAR built using JavaFX packager. Option could be (?) action, which will be modified run action, specifying classpath:

<runfx.args>-cp "${project.build.directory}/${project.build.finalName}.jar;${java.home}/lib/jfxrt.jar" FQN_OF_CLASS</runfx.args>
Comment 3 Roman Svitanic 2014-01-09 15:43:09 UTC
*** Bug 240141 has been marked as a duplicate of this bug. ***
Comment 4 Roman Svitanic 2014-01-21 08:48:10 UTC
These features haven't been implemented in Maven Java FX Project (archetype) yet, so am making an enhancement from this.
Comment 5 brettryan 2014-06-03 01:38:26 UTC
Strangely in NB 8.0 run file no longer works for war projects either, it used to in 7.4.
Comment 6 Roman Svitanic 2014-10-29 09:39:54 UTC
*** Bug 248227 has been marked as a duplicate of this bug. ***