VLC 在蓝光光盘上出现 Java Headless 错误

VLC 在蓝光光盘上出现 Java Headless 错误

我使用 VLC 已有很长时间了,观看蓝光,但由于“未找到 Java”类型的错误而无法访问菜单。我的环境是 Fedora 32,x64

我安装了 VLC 正在寻找的库:libbluray-bdj但无法播放任何蓝光光盘。VLC 输出以下内容:

$ vlc /dev/sr1
VLC media player 3.0.11.1 Vetinari (revision 3.0.11.1-0-g52483f3ca2)
[000055bcae1c25b0] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
dec.c:245: WARNING: using libmmbd for BD+. On-disc menus won't work with all discs.
org.videolan.BDJActionQueue:0: ERROR: Callback timeout in Thread[BDJLoader.BDJActionQueue,5,main], callback=org.videolan.BDJLoader$BDJLoaderAction@382cb045

java.lang.Long.toHexString(Long.java:272)
org.videolan.CacheDir.getCacheRoot(CacheDir.java:87)
org.videolan.CacheDir.create(CacheDir.java:110)
org.videolan.VFSCache.init(VFSCache.java:56)
org.videolan.VFSCache.createInstance(VFSCache.java:39)
org.videolan.BDJLoader.loadN(BDJLoader.java:173)
org.videolan.BDJLoader.access$200(BDJLoader.java:46)
org.videolan.BDJLoader$BDJLoaderAction.doAction(BDJLoader.java:363)
org.videolan.BDJAction.process(BDJAction.java:59)
org.videolan.BDJActionQueue.run(BDJActionQueue.java:86)
java.lang.Thread.run(Thread.java:748)
VFSCache.java:org.videolan.VFSCache.init:61: disc root is in UDF
org.videolan.BDJLoader:0: ERROR: loadN() failed: java.awt.HeadlessException
java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:204)
java.awt.Window.<init>(Window.java:536)
java.awt.Frame.<init>(Frame.java:420)
java.awt.Frame.<init>(Frame.java:385)
java.awt.BDRootWindow.<init>(BDRootWindow.java:32)
org.videolan.GUIManager.<init>(GUIManager.java:28)
org.videolan.GUIManager.createInstance(GUIManager.java:36)
org.videolan.BDJLoader.loadN(BDJLoader.java:228)
org.videolan.BDJLoader.access$200(BDJLoader.java:46)
org.videolan.BDJLoader$BDJLoaderAction.doAction(BDJLoader.java:363)
org.videolan.BDJAction.process(BDJAction.java:59)
org.videolan.BDJActionQueue.run(BDJActionQueue.java:86)
java.lang.Thread.run(Thread.java:748)
GUIManager:0: ERROR: getInstance(): no instance !
GUIManager:0: ERROR: getInstance(): no instance !
dec.c:245: WARNING: using libmmbd for BD+. On-disc menus won't work with all discs.
[00007f0530001ea0] libbluray demux: First play: 1, Top menu: 1
HDMV Titles: 5, BD-J Titles: 86, Other: 0
VFSCache.java:org.videolan.VFSCache.init:61: disc root is in UDF
org.videolan.BDJLoader:0: ERROR: loadN() failed: java.awt.HeadlessException
java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:204)
java.awt.Window.<init>(Window.java:536)
java.awt.Frame.<init>(Frame.java:420)
java.awt.Frame.<init>(Frame.java:385)
java.awt.BDRootWindow.<init>(BDRootWindow.java:32)
org.videolan.GUIManager.<init>(GUIManager.java:28)
org.videolan.GUIManager.createInstance(GUIManager.java:36)
org.videolan.BDJLoader.loadN(BDJLoader.java:228)
org.videolan.BDJLoader.access$200(BDJLoader.java:46)
org.videolan.BDJLoader$BDJLoaderAction.doAction(BDJLoader.java:363)
org.videolan.BDJAction.process(BDJAction.java:59)
org.videolan.BDJActionQueue.run(BDJActionQueue.java:86)
java.lang.Thread.run(Thread.java:748)
GUIManager:0: ERROR: getInstance(): no instance !

我试过多个蓝光光盘,也试过 cvlc。每次都出现同样的错误。

这看起来更像是 Java 错误而不是 VLC 错误,但我搞不清楚。互联网搜索没有找到任何结果。任何建议都将不胜感激。

答案1

确保您已安装以下软件包(名称可能因发行版而异,这些来自 Fedora 33):

  • 蓝光影视
  • libbluray-bdj

Fedora 33 已安装 Java 11,因此请安装以下包:

  • Java-11-openjdk

安装上述包可修复 java.awt.HeadlessException 错误。

如果您安装了其他版本的 Java,请确保安装相应的软件包。例如,对于 Fedora 上的 Java 8,其软件包为“java-1.8.0-openjdk”。

然后确保在启动 vlc 时已在环境中设置了 $JAVA_HOME。您可以使用以下命令手动测试:

$ JAVA_HOME=/usr/lib/jvm/jre vlc

现在,当您在 VLC 中打开 Bluray iso 时,它应该开始显示菜单。

相关内容