JDK-8116629 : Program compiled with Java 8 b113 on Windows will not run on same java version on Raspberry PI
  • Type: Bug
  • Component: javafx
  • Sub-Component: other
  • Affected Version: 8
  • Priority: P4
  • Status: Resolved
  • Resolution: Not an Issue
  • Submitted: 2013-11-01
  • Updated: 2015-06-17
  • Resolved: 2013-11-14
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 9
9Resolved
Related Reports
Relates :  
Description
My program crashes trying to find javafx/fxml/FXMLLoader on the Raspberry PI. Both the Windows box & PI are running 8.0.0-ea-b113. Observation:
Windows has jfxrt.jar, but ARM version for PI has jfxrt-controls.jar & jfxrt-graphics.jar. I ran the program with verbose class & classes from jfxrt-graphics.jar seem to load, but not the jfxrt-controls.jar which contains FXMLLoader.

Note: The version when I print the system property javafx.runtime.version return is 8.0.0-ea-b113. There is no value for this in the version dropdown above.

Stacktrace:
Exception in Application start method
java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:483)
	at com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(LauncherImpl.java:367)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:483)
	at com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:300)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:483)
	at sun.launcher.LauncherHelper$FXHelper.main(LauncherHelper.java:767)
Caused by: java.lang.RuntimeException: Exception in Application start method
	at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:894)
	at com.sun.javafx.application.LauncherImpl.access$000(LauncherImpl.java:56)
	at com.sun.javafx.application.LauncherImpl$1.run(LauncherImpl.java:158)
	at java.lang.Thread.run(Thread.java:744)
Caused by: java.lang.NoClassDefFoundError: javafx/fxml/FXMLLoader
	at striker.Striker.start(Striker.java:22)
	at com.sun.javafx.application.LauncherImpl$8.run(LauncherImpl.java:837)
	at com.sun.javafx.application.PlatformImpl$7.run(PlatformImpl.java:331)
	at com.sun.javafx.application.PlatformImpl$6$1.run(PlatformImpl.java:297)
	at com.sun.javafx.application.PlatformImpl$6$1.run(PlatformImpl.java:294)
	at java.security.AccessController.doPrivileged(Native Method)
	at com.sun.javafx.application.PlatformImpl$6.run(PlatformImpl.java:294)
	at com.sun.glass.ui.lens.LensApplication$RunnableEvent.dispatch(LensApplication.java:181)
	at com.sun.glass.ui.lens.LensApplication._runLoop(LensApplication.java:869)
	at com.sun.glass.ui.lens.LensApplication.access$1700(LensApplication.java:57)
	at com.sun.glass.ui.lens.LensApplication$4.run(LensApplication.java:922)
	... 1 more
Caused by: java.lang.ClassNotFoundException: javafx.fxml.FXMLLoader
	at java.net.URLClassLoader$1.run(URLClassLoader.java:359)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:348)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:347)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	... 12 more
Exception running application striker.Striker

Comments
I changed memory split to allocate 128m to video & it runs now.
15-11-2013

I gave it a try tonight. I never got it to load by updating the manifest. I ran your command and it did start, but started getting NPEs in createRectTexture. If I click around, I can eventually get part of the screen to show up. I'll try something simpler... maybe this is just too much for FX on the Pi.
15-11-2013

As a related note, the com.javafx.main.Main launcher class is being removed for FX 8. See RT-34236.
14-11-2013

Well, misleading error message but happy about the resolution. Thanks!
14-11-2013

The problem appears to be with the way you are launching the application. The com.sun.javafx.Main launcher class doesn't work for embedded - so you can either modify the manifest of the jar to point to the actual main class to run, or you can manually specify the class on the command line (instead of running with the -jar option). When I used this command line on the pi, the app loads fine: /mymnt/pi/jdk1.8.0/jre/bin/java -cp lib/FastInfoset.jar:lib/activation.jar:lib/asm-all-repackaged-2.1.88.jar:lib/cglib-2.1.88.jar:lib/gmbal-api-only.jar:lib/guava-14.0.1.jar:lib/ha-api.jar:lib/hk2-api-2.1.88.jar:lib/hk2-locator-2.1.88.jar:lib/hk2-utils-2.1.88.jar:lib/jackson-core-asl-1.9.11.jar:lib/jackson-jaxrs-1.9.11.jar:lib/jackson-mapper-asl-1.9.11.jar:lib/jackson-xc-1.9.11.jar:lib/javaee-web-api-7.0.jar:lib/javax.annotation-api-1.2.jar:lib/javax.annotation.jar:lib/javax.inject-2.1.88.jar:lib/javax.mail_1.4.jar:lib/javax.servlet-api-3.1.0.jar:lib/javax.ws.rs-api-2.0.jar:lib/jaxb-api-2.2.7.jar:lib/jaxb-api.jar:lib/jaxb-impl.jarlib/jaxb-xjc.jar:lib/jaxws-api.jar:lib/jaxws-rt.jar:lib/jaxws-tools.jar:lib/jersey-client.jar:lib/jersey-common.jar:lib/jersey-container-servlet-core.jar:lib/jersey-container-servlet.jar:lib/jersey-media-json-jackson-2.0.jar:lib/jersey-media-json-jettison-2.0.jar:lib/jersey-server.jar:lib/jettison-1.3.3.jar:lib/jsr173_1.0_api.jar:lib/jsr181-api.jar:lib/management-api.jar:lib/mimepull.jar:lib/org.osgi.core-4.2.0.jar:lib/osgi-resource-locator-1.0.1.jar:lib/persistence-api-1.0.jarlib/policy.jar:lib/saaj-api.jar:lib/saaj-impl.jar:lib/stax-ex.jar:lib/stax2-api.jar:lib/streambuffer.jar:lib/validation-api-1.1.0.jar:lib/woodstox-core-asl.jar:striker.jar striker.Striker
14-11-2013

Yes, I'll do it when I get home this afternoon.
08-11-2013

Wayne can you upload the problematic application?
08-11-2013

The current structure was defined as the simplest path to allow the two different levels of UI that we support - basic graphics, and then a higher level that includes UI controls.
05-11-2013

Question though: Why wouldn't we simply match the jar / module structure that we have (other than what we have now is working)? It seem that we should either have one jar or many jars but not two jars. NOTE: This is not important and I am fine with leaving the 2 jars.
05-11-2013

I don't see a need to change the packaging of JARs in Java 8. Yes, FXML should be working and we need to understand why it isn't.
05-11-2013

Interesting. Why don't we simply use the appropriate jars, one for each module on embedded ��� providing this makes sense. FXML is a jar and it can either be included or not included depending on whether we support FXML on embedded or not. Hmmmm ��� it seams that I many have missed the point of this JIRA. FXML should be there and should load, regardless of what jar it is in.
05-11-2013

Assign to Lisa to triage. I think that FXML should be in a separate module, not in the controls module.
05-11-2013