BluRay with Java crashes VLC on Ubuntu

*nix specific usage questions
mdiscjockey
New Cone
New Cone
Posts: 1
Joined: 21 May 2023 22:43

BluRay with Java crashes VLC on Ubuntu

Postby mdiscjockey » 21 May 2023 23:10

Hi everyone,
I have VLC running under Windows without problems, but moving to Ubuntu 22 I can't seem to be able to get it to run with Java Menus.
I installed libbluray-bdj and libbluray-bin and it still crashes (just closes and brings me a error in the terminal). Interestingly enough it brings a different error depending on which version I use:

With openjdk 8:

Code: Select all

$ JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64 vlc [00007f86cc001130] libbluray demux: First play: 1, Top menu: 1 HDMV Titles: 495, BD-J Titles: 5, Other: 0 Error occurred during initialization of VM java.lang.AbstractMethodError: java.io.FileSystem.isInvalid(Ljava/io/File;)Z at java.io.File.isInvalid(File.java:189) at java.io.File.exists(File.java:827) at java.lang.ClassLoader$3.run(ClassLoader.java:1873) at java.security.AccessController.doPrivileged(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1870) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1838) at java.lang.Runtime.loadLibrary0(Runtime.java:843) at java.lang.System.loadLibrary(System.java:1136) at java.lang.System.initializeSystemClass(System.java:1212) QObject::~QObject: Timers cannot be stopped from another thread
With openjdk 11:

Code: Select all

$ JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64 vlc Error occurred during initialization of boot layer java.lang.LinkageError: loader 'bootstrap' attempted duplicate class definition for java.lang.invoke.SimpleMethodHandle. (java.lang.invoke.SimpleMethodHandle is in module java.base of loader 'bootstrap')
Now clearly there is something wrong with the installation (I guess some dependencies are missing?) but I can't find what.
I installed VLC via sudo apt install vlc and libbluray via sudo apt install libbluray-bdj libbluray-bin so there isn't realy anything that could go wrong I guess?
I installed the java versions as follows after it still failed to see if that helps, but it didn't:


sudo apt-get install openjdk-11-jre
sudo apt-get install openjdk-11-jdk
sudo apt-get install openjdk-8-jdk
sudo apt-get install openjdk-8-jre


I am launching vlc via the terminal and passing it the JAVA_HOME path so it always finds the right version, so that shouldn't be an issue, since the error is clearly some java error code, so vlc can talk to the jvm

I also tried a daily build (Version 4.0.0 RC1) with the same result, so I am really at a loss here.
All I could find using google is that yes, libbluray-bdj libbluray-bin should have installed everything.

So I am now pretty much stuck and don't really know what to do.

Any help would be appreciated.

sharki_
New Cone
New Cone
Posts: 2
Joined: 09 Apr 2024 06:09

Re: BluRay with Java crashes VLC on Ubuntu

Postby sharki_ » 09 Apr 2024 06:13

I am having the same problem in kubuntu 22.04. anyone know a fix? i really wanted to watch zootopia on blu ray while coding tonight but oh well..

sharki_
New Cone
New Cone
Posts: 2
Joined: 09 Apr 2024 06:09

Re: BluRay with Java crashes VLC on Ubuntu

Postby sharki_ » 09 Apr 2024 11:46

Okay, I promise I won't bump the old thread anymore but I figured out what it is. I forgot that a lot of blu rays do not load the menus properly in VLC so I set the option to skip the disc menu when loading the disc. Now I get to watch Zootopia! woohooo :)

zoouf
New Cone
New Cone
Posts: 2
Joined: 20 Sep 2024 11:51

Re: BluRay with Java crashes VLC on Ubuntu

Postby zoouf » 20 Sep 2024 12:07

I posted the following in response to another thread about the same issue https://forum.videolan.org/viewtopic.ph ... 83#p546583
But I'll include the information here because I think it will help people. If this is taboo let me know and i will just link to my post in the other thread instead.

For anyone else having trouble getting VLC BD-J menus working. I ran into all the same errors but I managed to get it working under Ubuntu 22.04.

First I installed 3.0.20 using an alternative PPA (you can find detais by googling but I'll paste below).

```
sudo add-apt-repository ppa:ubuntuhandbook1/vlc
sudo apt update
sudo apt install vlc libbluray2 libbluray-bdj libbdplus0

ii libbluray-bdj 1:1.3.1-1 all Blu-ray Disc Java support library (BD-J library)
ii libbluray2:amd64 1:1.3.1-1 amd64 Blu-ray disc playback support library (shared library)
ii libbdplus0:amd64 0.2.0-1 amd64 implementation of BD+ for reading Blu-ray Discs
```

If you need to do aacs decryption you will need additional libraries

Next I needed to use oracle jvm. And since my libbluray2 version was only 1.3.1 I went for 1.16 as that is the latest version they say they added support for in 1.3.1.

```
from code.videolan.org videolan libbluray - blob master ChangeLog
2022-03-03: Version 1.3.1
- Add support for Java 13 ... 16.
```

The name of the file I installed for oracle jvm 16 was "jdk-16.0.2_linux-x64_bin.deb"

After I installed it I couldn't use the command to switch it because it wasn't added so I first needed to add it.
```
sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk-16.0.2/bin/java 2
sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk-16.0.2/bin/javac 2
sudo update-alternatives --config java
sudo update-alternatives --config javac
```

After installing it I can launch the following command to play blurays with bd-j menus under ubuntu 22.04.
```
BD_DEBUG_MASK=141314 BD_DEBUG_FILE=/home/user/Downloads/bd_debug.log JAVA_HOME=/usr/lib/jvm/jdk-16.0.2 /usr/bin/vlc bluray:///media/user/bluray_disc_name/
```

You will need extra steps to support aacs and what not but hopefully this will help someone.
Openjdk, would NOT work no matter what version I tried that was available from the ubuntu ppa.


Return to “VLC media player for Linux and friends Troubleshooting”

Who is online

Users browsing this forum: No registered users and 17 guests