JDK-8116735 : Launcher has AWT dependencies
  • Type: Bug
  • Component: deploy
  • Sub-Component: packager
  • Affected Version: 8
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • Submitted: 2013-04-05
  • Updated: 2015-06-17
  • Resolved: 2013-11-14
Related Reports
Blocks :  
Duplicate :  
Duplicate :  
Description
the launcher code contains AWT specific code, which is problematic for the eJRE compact model - if we use that path.

But... this code may not end up being called in normal use, so this may be OK.

This was found using an incorrect calling sequence:
     /opt/ejre1.8.0_b84_compact1/bin/java -cp ../working/artifacts/armv6hf-vfp/sdk/rt/lib/ext/jfxrt.jar:BouncingBalls.jar com.javafx.main.Main

(should be bouncingballs.Main and not com.javafx.main.Main in this case.)

and getting class not found exceptions creating NoJavaFXFallback.isOldJRE which extends JApplet.

This Jira is being filed so that wiser minds can think about this path and determine if there is a real problem that needs to be solved, or if we just want to tell people that they are doing it wrong :-)

Perhaps something in the code that tells them not to call the launcher directly ?


Exception in thread "main" java.lang.NoClassDefFoundError: java/awt/event/ActionListener
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClass(Unknown Source)
	at java.security.SecureClassLoader.defineClass(Unknown Source)
	at java.net.URLClassLoader.defineClass(Unknown Source)
	at java.net.URLClassLoader.access$100(Unknown Source)
	at java.net.URLClassLoader$1.run(Unknown Source)
	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 com.javafx.main.Main.checkJre(Main.java:765)
	at com.javafx.main.Main.main(Main.java:834)
Caused by: java.lang.ClassNotFoundException: java.awt.event.ActionListener
	at java.net.URLClassLoader$1.run(Unknown Source)
	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)
Comments
The remainder of this issue will be addressed by RT-34236 which will eliminate the com.javafx.main.Main and NoJavaFXFallback classes.
14-11-2013

This was partially addressed by Mark with the fix for RT-33666. I need to evaluate whether anything else is needed.
24-10-2013

Raising to P3. We really need to remove all AWT fallback code for FX 8, and this might point to a larger issue that needs to be taken care of.
30-09-2013