Hello everyone
I’m trying to use the Oracle JRE to build a Java app into a snap (basically building the app with OpenJDK, filtering out the OpenJDK JRE at prime time and using another part to download and bundle the Oracle JRE). The building is fine and I can run the app without any problems, but using the MediaPlayer class of JavaFX to play a sound like an MP3 file raises an exception and fails. I have tried adding libavcodec and libavformat (the variants available on Ubuntu 16.04), but that doesn’t do anything.
The relevant exception itself is the following :
com.sun.media.jfxmedia.MediaException: Could not create player!
at com.sun.media.jfxmediaimpl.NativeMediaManager.getPlayer(NativeMediaManager.java:274) ~[jfxrt.jar:?]
No other details are given on the nature of the exception, the message itself being UNKNOWN…
The MediaPlayer works fine when using the Oracle JDK outside of a snap, so I don’t understand what’s going on.