Trying to play Blu-Ray movies with BD-J menu support (makeMKV decryption)

I’m trying to play a movie that has a Blu Ray Disc - Java menu, but VLC seems to ignore my JVM.

I’m using makeMKV (AUR) and libaacs for decryption.

I believe that this is the issue because I can find the java version in a bash prompt

java --version
openjdk 17.0.3 2022-04-19
OpenJDK Runtime Environment (build 17.0.3+3)
OpenJDK 64-Bit Server VM (build 17.0.3+3, mixed mode)

I have tested a Blu Ray movie that does not have a java menu, and it boots into the menu just fine.

If anyone has any advice on where to go from here it’d be much appreciated. If more information is needed I’m more than happy to provide.

newer version is available in Testing and Unstable branches. You can either wait for Stable branch update or switch branches:

java -version                                                         [1]
openjdk version "1.8.0_332"
OpenJDK Runtime Environment (build 1.8.0_332-b09)
OpenJDK 64-Bit Server VM (build 25.332-b09, mixed mode)

I don’t know if this is relevant for your problem but vlc needs this to be able to play a bluray decrypted by makemkv:
Aribb24 (repo)

If this has anything to do with your specific problem remains to be seen

Sorry forgot to include. I do have aribb24 installed as well as sdl_image. I’m still stuck

Is libbluray installed? I see some references to libbluray-bdj, but I don’t see a package for Arch.

I do have libbluray installed!

I’m currently trying some trickery of launching vlc from bash and having this in ~/.bashrc

export JAVA_HOME=/usr/lib/jvm/java-17-openjdk
export PATH=$JAVA_HOME/bin:$PATH

It’s throwing some weird data in the terminal

VLC media player 3.0.17.3 Vetinari (revision 3.0.13-8-g41878ff4f2)
uint DBusMenuExporterDBus::GetLayout(int, int, const QStringList&, DBusMenuLayoutItem&): Condition failed: menu
uint DBusMenuExporterDBus::GetLayout(int, int, const QStringList&, DBusMenuLayoutItem&): Condition failed: menu
[0.165s][warning][jni,resolve] Re-registering of platform native method: org.videolan.Logger.logN(ZLjava/lang/String;ILjava/lang/String;)V from code in a different classloader
[0.166s][warning][jni,resolve] Re-registering of platform native method: org.videolan.Libbluray.getAacsDataN(JI)[B from code in a different classloader
[0.166s][warning][jni,resolve] Re-registering of platform native method: org.videolan.Libbluray.getUOMaskN(J)J from code in a different classloader
[0.166s][warning][jni,resolve] Re-registering of platform native method: org.videolan.Libbluray.setUOMaskN(JZZ)V from code in a different classloader
[0.166s][warning][jni,resolve] Re-registering of platform native method: org.videolan.Libbluray.setKeyInterestN(JI)V from code in a different classloader
[0.166s][warning][jni,resolve] Re-registering of platform native method: org.videolan.Libbluray.getTitleInfosN(J)[Lorg/videolan/TitleInfo; from code in a different classloader
[0.166s][warning][jni,resolve] Re-registering of platform native method: org.videolan.Libbluray.getPlaylistInfoN(JI)Lorg/videolan/PlaylistInfo; from code in a different classloader
[0.166s][warning][jni,resolve] Re-registering of platform native method: org.videolan.Libbluray.seekN(JIIJ)J from code in a different classloader
[0.166s][warning][jni,resolve] Re-registering of platform native method: org.videolan.Libbluray.selectPlaylistN(JIIIJ)I from code in a different classloader
[0.166s][warning][jni,resolve] Re-registering of platform native method: org.videolan.Libbluray.selectTitleN(JI)I from code in a different classloader
[0.166s][warning][jni,resolve] Re-registering of platform native method: org.videolan.Libbluray.setVirtualPackageN(JLjava/lang/String;Z)I from code in a different classloader
[0.166s][warning][jni,resolve] Re-registering of platform native method: org.videolan.Libbluray.selectAngleN(JI)I from code in a different classloader
[0.166s][warning][jni,resolve] Re-registering of platform native method: org.videolan.Libbluray.soundEffectN(JI)I from code in a different classloader
[0.166s][warning][jni,resolve] Re-registering of platform native method: org.videolan.Libbluray.tellTimeN(J)J from code in a different classloader
[0.166s][warning][jni,resolve] Re-registering of platform native method: org.videolan.Libbluray.selectRateN(JFI)I from code in a different classloader
[0.166s][warning][jni,resolve] Re-registering of platform native method: org.videolan.Libbluray.writeRegN(JIIII)I from code in a different classloader
[0.166s][warning][jni,resolve] Re-registering of platform native method: org.videolan.Libbluray.readRegN(JII)I from code in a different classloader
[0.166s][warning][jni,resolve] Re-registering of platform native method: org.videolan.Libbluray.cacheBdRomFileN(JLjava/lang/String;Ljava/lang/String;)I from code in a different classloader
[0.166s][warning][jni,resolve] Re-registering of platform native method: org.videolan.Libbluray.listBdFilesN(JLjava/lang/String;Z)[Ljava/lang/String; from code in a different classloader
[0.166s][warning][jni,resolve] Re-registering of platform native method: org.videolan.Libbluray.getBdjoN(JLjava/lang/String;)Lorg/videolan/bdjo/Bdjo; from code in a different classloader
[0.166s][warning][jni,resolve] Re-registering of platform native method: org.videolan.Libbluray.updateGraphicN(JII[IIIII)V from code in a different classloader
[0.204s][warning][jni,resolve] Re-registering of platform native method: java.awt.BDFontMetrics.initN()J from code in a different classloader
[0.204s][warning][jni,resolve] Re-registering of platform native method: java.awt.BDFontMetrics.destroyN(J)V from code in a different classloader
[0.204s][warning][jni,resolve] Re-registering of platform native method: java.awt.BDFontMetrics.resolveFontN(Ljava/lang/String;I)Ljava/lang/String; from code in a different classloader
[0.204s][warning][jni,resolve] Re-registering of platform native method: java.awt.BDFontMetrics.unloadFontConfigN()V from code in a different classloader
[0.204s][warning][jni,resolve] Re-registering of platform native method: java.awt.BDFontMetrics.getFontFamilyAndStyleN(JLjava/lang/String;)[Ljava/lang/String; from code in a different classloader
[0.204s][warning][jni,resolve] Re-registering of platform native method: java.awt.BDFontMetrics.loadFontN(JLjava/lang/String;I)J from code in a different classloader
[0.204s][warning][jni,resolve] Re-registering of platform native method: java.awt.BDFontMetrics.destroyFontN(J)V from code in a different classloader
[0.204s][warning][jni,resolve] Re-registering of platform native method: java.awt.BDFontMetrics.charWidthN(JC)I from code in a different classloader
[0.204s][warning][jni,resolve] Re-registering of platform native method: java.awt.BDFontMetrics.stringWidthN(JLjava/lang/String;)I from code in a different classloader
[0.204s][warning][jni,resolve] Re-registering of platform native method: java.awt.BDFontMetrics.charsWidthN(J[CII)I from code in a different classloader
[0.206s][warning][jni,resolve] Re-registering of platform native method: java.awt.BDGraphicsBase.drawStringN(JLjava/lang/String;III)V from code in a different classloader
WARNING: A terminally deprecated method in java.lang.System has been called
WARNING: System::setSecurityManager has been called by org.videolan.Libbluray
WARNING: Please consider reporting this to the maintainers of org.videolan.Libbluray
WARNING: System::setSecurityManager will be removed in a future release
Libbluray.java:org.videolan.Libbluray$1.getProperty:68: getProperty(user.dir): no context !     java.base/java.lang.System.getProperty(System.java:918)
        java.base/sun.security.action.GetPropertyAction.run(GetPropertyAction.java:87)
        java.base/sun.security.action.GetPropertyAction.run(GetPropertyAction.java:53)
        java.base/java.security.AccessController.doPrivileged(AccessController.java:318)
        java.base/sun.security.action.GetPropertyAction.privilegedGetProperty(GetPropertyAction.java:108)
        java.base/java.io.FilePermission.<clinit>(FilePermission.java:209)
        java.base/java.lang.SecurityManager.checkRead(SecurityManager.java:756)
        java.base/java.io.File.isDirectory(File.java:860)
        java.base/org.videolan.CacheDir.getCacheRoot(CacheDir.java:78)
        java.base/org.videolan.CacheDir.create(CacheDir.java:110)
        java.base/org.videolan.VFSCache.init(VFSCache.java:56)
        java.base/org.videolan.VFSCache.createInstance(VFSCache.java:39)
        java.base/org.videolan.BDJLoader.loadN(BDJLoader.java:173)
        java.base/org.videolan.BDJLoader.access$200(BDJLoader.java:46)
        java.base/org.videolan.BDJLoader$BDJLoaderAction.doAction(BDJLoader.java:363)
        java.base/org.videolan.BDJAction.process(BDJAction.java:59)
        java.base/org.videolan.BDJActionQueue.run(BDJActionQueue.java:86)
        java.base/java.lang.Thread.run(Thread.java:833)
org.videolan.BDJLoader:0: ERROR: loadN() failed: java.lang.ExceptionInInitializerError
        java.desktop/sun.java2d.loops.GraphicsPrimitiveMgr.initIDs(Native Method)
        java.desktop/sun.java2d.loops.GraphicsPrimitiveMgr.<clinit>(GraphicsPrimitiveMgr.java:56)
        java.desktop/sun.java2d.loops.Blit.<clinit>(Blit.java:114)
        java.desktop/sun.java2d.xr.XRPMBlitLoops.register(XRPMBlitLoops.java:46)
        java.desktop/sun.java2d.xr.XRSurfaceData.initXRSurfaceData(XRSurfaceData.java:106)
        java.desktop/sun.awt.X11GraphicsEnvironment$1.run(X11GraphicsEnvironment.java:123)
        java.base/java.security.AccessController.doPrivileged(AccessController.java:318)
        java.desktop/sun.awt.X11GraphicsEnvironment.<clinit>(X11GraphicsEnvironment.java:60)
        java.desktop/sun.awt.PlatformGraphicsInfo.createGE(PlatformGraphicsInfo.java:36)
        java.desktop/java.awt.GraphicsEnvironment$LocalGE.createGE(GraphicsEnvironment.java:93)
        java.desktop/java.awt.GraphicsEnvironment$LocalGE.<clinit>(GraphicsEnvironment.java:84)
        java.desktop/java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:106)
        java.desktop/java.awt.Window.initGC(Window.java:492)
        java.desktop/java.awt.Window.init(Window.java:512)
        java.desktop/java.awt.Window.<init>(Window.java:554)
        java.desktop/java.awt.Frame.<init>(Frame.java:428)
        java.desktop/java.awt.Frame.<init>(Frame.java:393)
        java.desktop/java.awt.BDRootWindow.<init>(BDRootWindow.java:32)
        java.base/org.videolan.GUIManager.<init>(GUIManager.java:28)
        java.base/org.videolan.GUIManager.createInstance(GUIManager.java:36)
        java.base/org.videolan.BDJLoader.loadN(BDJLoader.java:228)
        java.base/org.videolan.BDJLoader.access$200(BDJLoader.java:46)
        java.base/org.videolan.BDJLoader$BDJLoaderAction.doAction(BDJLoader.java:363)
        java.base/org.videolan.BDJAction.process(BDJAction.java:59)
        java.base/org.videolan.BDJActionQueue.run(BDJActionQueue.java:86)
        java.base/java.lang.Thread.run(Thread.java:833)
GUIManager:0: ERROR: getInstance(): no instance !
# I quit VLC here
GUIManager:0: ERROR: getInstance(): no instance !
org.videolan.BDJSecurityManager:0: ERROR: denied ("java.lang.RuntimePermission" "setSecurityManager")
        java.base/org.videolan.BDJSecurityManager.checkPermission(BDJSecurityManager.java:110)
        java.base/java.lang.System.setSecurityManager0(System.java:442)
        java.base/java.lang.System.implSetSecurityManager(System.java:432)
        java.base/java.lang.System.setSecurityManager(System.java:405)
        java.base/org.videolan.Libbluray.shutdown(Libbluray.java:378)
Libbluray.java:org.videolan.Libbluray.shutdown:380: System.setSecurityManager(null) failed: java.lang.SecurityException: denied ("java.lang.RuntimePermission" "setSecurityManager")
Libbluray.java:org.videolan.Libbluray.shutdown:395: shutdown() failed: java.lang.NoClassDefFoundError: Could not initialize class java.awt.GraphicsEnvironment$LocalGE
        java.desktop/java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:106)
        java.desktop/sun.awt.X11.XToolkit.<clinit>(XToolkit.java:224)
        java.desktop/sun.awt.PlatformGraphicsInfo.createToolkit(PlatformGraphicsInfo.java:40)
        java.desktop/java.awt.Toolkit.getDefaultToolkit(Toolkit.java:599)
        java.desktop/java.awt.BDToolkitBase.shutdownDisc(BDToolkitBase.java:60)
        java.base/org.videolan.Libbluray.shutdown(Libbluray.java:385)

So something I’ve noticed between launching Kodi and VLC is this bit of code that pops out

WARNING: A terminally deprecated method in java.lang.System has been called
WARNING: System::setSecurityManager has been called by org.videolan.Libbluray
WARNING: Please consider reporting this to the maintainers of org.videolan.Libbluray
WARNING: System::setSecurityManager will be removed in a future release

Does this mean I have the wrong version jvm installed? If that’s the case, should I look for an older or newer version?

Edit: Nevermind, this code has to do with Java being weird, not why Java can’t load Blu-Ray menus

Using openSUSE to play Blu rays, I’ve noticed that it uses another package called libbluray-bdj to enable support for java powered movie menus. This package is MIA in Manjaro, or it’s not effectively bundled in libbluray.