B4J Question B4JPackager11 Error With MediaPlayer, jAudioClip [SOLVED]

jmon

Well-Known Member
Licensed User
Longtime User
Hello,
As the title says, I have errors with jAudioClip when compiling an exe with B4JPackager11 or Windows. I also tried with MediaPlayer, and get the same error when running the exe.

With MediaPlayer:

With jAudioClip:

Both errors are related to "Unsupported protocol "jrt"". I couldn't find anything relevant on internet. My App runs fine in Release, Debug modes, or as a Jar, but the error happens when running the exe.

Thank you for your help.

EDIT: Solution: The Exe cannot access the audio or video files in File.DirAssets. Copy your files to File.DirApp or File.DirData.
 
Last edited:

jmon

Well-Known Member
Licensed User
Longtime User
Yes sorry, Java 11.0.1 (The one bundled on the download page of B4J)

Found this, maybe related
Yes that seems related, but no help from their side!
 
Last edited:
Upvote 0

jmon

Well-Known Member
Licensed User
Longtime User
Ok Thanks, that lead to the answer I guess:
https://bugs.openjdk.java.net/browse/JDK-8209180

CUSTOMER SUBMITTED WORKAROUND :
The work around is to leave the media file outside of the custom image and load it using a file: an http: or an https: URL. But that goes counter to the purpose of building a custom image.

We cannot load from File.Dirassets
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…