UnsupportedClassVersionError: javafx/scene/media/MediaException, how can I resolve this?

9 views
Skip to first unread message

tho...@watt-analytics.com

unread,
Jun 7, 2019, 6:22:07 AM6/7/19
to CodenameOne Discussions
Exception in thread "AWT-EventQueue-0" java.lang.UnsupportedClassVersionError: javafx/scene/media/MediaException has been compiled by a more recent version of the Java Runtime (class file version 54.0), this version of the Java Runtime only recognizes class file versions up to 52.0

This problem shows up when I start the simulator and keeps it of from running the app.
The problem came a few days ago. I am not aware that I downloaded some new versions or changed the runtime / development environment

If you are experiencing an issue please mention the full platform your issue applies to:
IDE: NetBeans
Desktop OS: MacOS
Simulator : YES
Device: iPhone 7

Steve Hannah

unread,
Jun 7, 2019, 7:54:01 AM6/7/19
to codenameone...@googlegroups.com
The simulator requireds JavaFX for some of its components (e.g. Media, and Browser).  Sounds like you're using OpenJDK8, which lacks JavaFX.  You either need to use Oracle's JDK8 (which has JavaFX), or OpenJDK9+, for which the simulator will provide its own version of JavaFX.  This error indicates that it can't find JavaFX, so it's using the supplied JavaFX libs - but these libs are build for JDK9 so are incompatible with the JDK8 runtime.

Steve

--
You received this message because you are subscribed to the Google Groups "CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to codenameone-discu...@googlegroups.com.
Visit this group at https://groups.google.com/group/codenameone-discussions.
To view this discussion on the web visit https://groups.google.com/d/msgid/codenameone-discussions/998a8080-0bf4-4beb-8941-d7875880860d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
Steve Hannah
Software Developer
Codename One
Reply all
Reply to author
Forward
0 new messages