JDK-8119010 : Unable to launch JavaFX 8 sample via invoking the application jar file directly
  • Type: Bug
  • Component: javafx
  • Sub-Component: other
  • Affected Version: 8
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2013-01-24
  • Updated: 2015-06-17
  • Resolved: 2013-01-30
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 8
8Fixed
Related Reports
Blocks :  
Duplicate :  
Description
It is noticed that one can not launch the JavaFX 8 application by invoking the application jar directly.

e.g java -jar BouncingBalls.jar
>>>> Error: JavaFX runtime components are missing, and are required to run this application 

The problem has been occurring  since JavaFX8-b73

*** Tested Configuration:
- x86 Win 7, Vista
- jre 8-b74 (SWAT build)

*** Steps to reproduce:

0) Install jre8-b74 from
http://jre.us.oracle.com/java/re/jdk/8/promoted/ea/b74/bundles/windows-i586/jre-8-ea-bin-b74-windows-i586-24_jan_2013.exe

2) Install JavaFX 8 sample from
http://jre.us.oracle.com/java/re/javafx/8.0/prepromote/ea/b74/bundles/windows-i586/javafx_samples-8_0_0-ea-b74-windows-23_jan_2013.zip

3) Invoke any sample application jar file installed from step#2

e.g  java -jar C:\javafx-sample-8.0.0-ea\BouncingBalls,jar

If the app failed to load with the  >>> Error: JavaFX runtime components are missing, and are required to run this application  <<<
then the issue is reproducible 

(If you install jre8-b72 or earlier build and do the same above steps, the issue can not be reproducible, the bouncing ball app loaded fine)



Comments
Verified on 8.0b120
30-12-2013

This is fixed by RT-26125
30-01-2013

Evaluation: This is a JDK bug caused by the recent change to the java launcher -- https://jbs.oracle.com/bugs/browse/JDK-8004547 -- which causes the JavFX launcher to be used in place of the main method for FX applications, even if jfxrt.jar is not on the classpath. The fix for 8004547 was tested with jfxrt.jar on the default classpath, but it will fail to locate the JavaFX launcher if jfxrt.jar it is not on the classpath, so it will exit without launching the application. I could file a bug against the Java launcher, and close this issue as "not a bug". However, since this bug will be resolved once jfxrt.jar is moved into lib/ext when RT-26125 is implemented, I will leave it open here and just mark this as resolved/fixed at the same time.
25-01-2013

The above workaround is probably the best. Al alternative workaround, if you don't / can't mofidy your JRE, is to put jfxrt.jar on the boot classpath as follows: java -Xbootclasspath/a:JRE/lib/jfxrt.jar ... where "JRE" is the full path to your jre.
25-01-2013

Workaround proposed by Kumar Srinivasan: cp jre/lib/jfxrt.jar jre/lib/ext/jfxrt.jar
25-01-2013