ivan-hc / VLC-appimage

VLC Video and Media Player AppImages built from JuNest (Arch Linux) and PPA.
25 stars 3 forks source link

AppImage from the last ppa version (3.0.20) #8

Closed kenderipa closed 8 months ago

kenderipa commented 8 months ago

Hey, it's me again :)

Would you mind updating the ppa AppImage to 3.0.20? It would be really cool, since I'm now playing all my Blu-Rays under Linux, and the previous version does not alsways show the Java menu content. Also, the continuous version seems unusable for this purpose with following errors:

aacs.c:121: No usable AACS libraries found! bdj.c:795: BD-J check: Failed to load JVM library bdj.c:795: BD-J check: Failed to load JVM library [00007f5800001130] libbluray demux: First play: 1, Top menu: 0 HDMV Titles: 2, BD-J Titles: 2, Other: 2

Of course, AACS and Java are both properly set up.

ivan-hc commented 8 months ago

Using PPAs is a step back for me. My work is on the Archimage version here. Just help me improving it, do not workaround it, because PPAs and Ubuntu are quite dead, while Arch Linux is the future and a guarantee of continuity.

We can add the missing libraries in the Archimage, this is not a problem. If you try to build the Archimage by yourself on your PC by including missing dependences into the script, thiw would help me improving the main release I'm working on. It is enough to run the latest build from terminal using LD_DEBUG=libs and when you do something, you can report the missing library to me, so I can add it:

LD_DEBUG=libs ./VLC*.AppImage

I wont maintain PPA-based release anymore, but if you need it you can fork this repository and redirect the workflow to the script you're interested in. Its not difficult.

kenderipa commented 8 months ago

Although building AppImages is outside my area of expertise, I'm willing to give it a try. Let's start with libraries. Libraries needed are: libbluray (libbluray2 on Debian), libbluray-bdj, libaacs, libbdplus. Do I understand correctly, that the ArchImage-based AppImage won't see them installed on my system? If yes, could you start by adding those libraries to the AppImage?

ivan-hc commented 8 months ago

In Arch Linux I've not found libbluray-bdj or any reference apart libbluray-git, from AUR, and it conflicts with libbluray.

The next release I'll upload will include all dependences.

I think that the previous one was so small because it was not including dependences, however it is still small now, compared to the ones based on PPA.

ivan-hc commented 8 months ago

Its ready, try now

https://github.com/ivan-hc/VLC-appimage/releases/tag/continuous

if this works for you, please close the issue.

kenderipa commented 8 months ago

It works, but only halfways. Right now the menus are not supported.

bdj.c:795: BD-J check: Failed to load JVM library bdj.c:795: BD-J check: Failed to load JVM library [00007f18e0001130] libbluray demux: First play: 0, Top menu: 0 HDMV Titles: 2, BD-J Titles: 87, Other: 87 [00007f18e0001130] libbluray demux error: BD-J menus not supported. Playing without menus. BD-J support: 1, JVM found: 0, JVM usable: 0

Would it make sense to add Java too? It works with Java 17, packages: openjdk-17-jdk-headless, openjdk-17-jre, openjdk-17-jre-headless (Debian).

Also, following packages are installed as dependencies: ca-certificates-java fonts-dejavu-extra java-common libatk-wrapper-java libatk-wrapper-java-jni

kenderipa commented 8 months ago

Also, it would be great, if one could play DVDs. For that, libdvdcss, libdvdnav and libdvdread are required.

ivan-hc commented 8 months ago

I can add libdvdcss, libdvdnav and libdvdread... about JVM libraries, its better if you say what are the exact libraries needed by VLC, because on Arch Linux the packages are really big.

By including them it would cause an extra amount of unneeded files. I can install them separatelly in the container, then the script will tak only the unneeded files.

EDIT: as you can see at https://archlinux.org/packages/extra/x86_64/vlc/ there is no reference to Java or jdk. So you should tell me the exact name of the library you need.

ivan-hc commented 8 months ago

Although building AppImages is outside my area of expertise, I'm willing to give it a try.

With Archimage-CLI its really easy. You should give it a try:

wget https://raw.githubusercontent.com/ivan-hc/ArchImage/main/archimage-cli
chmod a+x ./archimage-cli
./archimage-cli -b [package]

where "package" is one of all those listed in the Arch Linux repository and AUR (applications, like gimp, vlc, obs-studio... not libraries, they are dependences).

kenderipa commented 8 months ago

Regarding Java:

 12039:     /usr/lib/libaacs.so.0: error: symbol lookup error: undefined symbol: bdplus_get_code_date (fatal)
 12039:     find library=libjvm.so [0]; searching
 12039:      search cache=/etc/ld.so.cache
 12039:      search path=/usr/lib           (system search path)
 12039:       trying file=/usr/lib/libjvm.so
 12039:

bdj.c:795: BD-J check: Failed to load JVM library 12039: find library=libjvm.so [0]; searching 12039: search cache=/etc/ld.so.cache 12039: search path=/usr/lib (system search path) 12039: trying file=/usr/lib/libjvm.so 12039: bdj.c:795: BD-J check: Failed to load JVM library

Regarding DVD:

 12248:     find library=libdvdcss.so.2 [0]; searching
 12248:      search cache=/etc/ld.so.cache
 12248:       trying file=/usr/lib/libdvdcss.so.2
 12248:
 12248:
 12248:     calling init: /usr/lib/libdvdcss.so.2
 12248:
 12248:     /usr/lib/libdvdcss.so.2: error: symbol lookup error: undefined symbol: dvdcss_crack (fatal)

[00007f4470001130] dvdnav demux error: Could not open systemd-1 with libdvdcss. [00007f4470001130] dvdnav demux error: Can't open systemd-1 for reading [00007f4470001130] dvdnav demux error: Device systemd-1 inaccessible, CSS authentication not available. [00007f4470001130] dvdnav demux error: Can't read name block. Probably not a DVD-ROM device. [00007f4470001130] dvdnav demux: DVD disk reports itself with Region mask 0x00fd0000. Regions: 02 [000055f757705f90] main audio output error: too low audio sample frequency (0) [00007f447004a420] main decoder error: failed to create audio output [00007f44700412b0] main decoder error: buffer deadlock prevented [000055f757705f90] vlcpulse audio output error: digital pass-through stream connection failure: Input/Output error [000055f757705f90] main audio output error: module not functional [00007f447004a420] main decoder error: failed to create audio output [00007f447c000c90] main input error: ES_OUTSET(GROUP_)PCR is called too late (pts_delay increased to 377 ms)

ivan-hc commented 8 months ago

Have you tested the last build uploaded 1 hour ago, includinf libdvd libraries?

kenderipa commented 8 months ago

Have you tested the last build uploaded 1 hour ago, includinf libdvd libraries?

Yeah, the errors are from that test.

ivan-hc commented 8 months ago

try to launch the command

LD_LIBRARY_PATH=/usr/lib/jvm ./VLC*.AppImage

EDIT: where is the "jvm" directory placed in /usr/lib or /usr/lib/x86_64-linux-gnu?

kenderipa commented 8 months ago

LD_LIBRARY_PATH=/usr/lib/jvm ./VLC*.AppImage

bdj.c:795: BD-J check: Failed to load JVM library bdj.c:795: BD-J check: Failed to load JVM library [00007f421c001190] libbluray demux: First play: 0, Top menu: 0 HDMV Titles: 2, BD-J Titles: 87, Other: 87 [00007f421c001190] libbluray demux error: BD-J menus not supported. Playing without menus. BD-J support: 1, JVM found: 0, JVM usable: 0

Edit:

EDIT: where is the "jvm" directory placed in /usr/lib or /usr/lib/x86_64-linux-gnu?

It's /usr/lib on my system. The folder itself looks like this:

kender@Kender:/usr/lib$ lsd -la jvm drwxr-xr-x root root 4.0 KB Sun Feb 11 15:46:10 2024  . drwxr-xr-x root root 4.0 KB Sat Feb 10 22:56:56 2024  .. .rw-r--r-- root root 1.7 KB Wed Jan 17 12:09:47 2024  .java-1.17.0-openjdk-amd64.jinfo lrwxrwxrwx root root 25 B Thu Oct 5 00:56:32 2023  default-java ⇒ java-1.17.0-openjdk-amd64 lrwxrwxrwx root root 21 B Wed Jan 17 12:09:47 2024  java-1.17.0-openjdk-amd64 ⇒ java-17-openjdk-amd64 drwxr-xr-x root root 4.0 KB Sun Feb 11 15:47:12 2024  java-17-openjdk-amd64

ivan-hc commented 8 months ago

Try to build the Archimage on your system:

mkdir tmp
cd tmp
wget https://raw.githubusercontent.com/ivan-hc/VLC-appimage/main/vlc-junest.sh
chmod a+x ./vlc-junest.sh

add jdk-openjdk as an extra dependence/basic stuff, like this

sed -i 's/BASICSTUFF="binutils gzip"/BASICSTUFF="binutils gzip jdk-openjdk"/g' ./vlc-junest.sh

and made the library searchable

sed -i 's/v4l"/libjvm.so v4l"/g' ./vlc-junest.sh

then start build the AppImage

./vlc-junest.sh

it takes about 2-3 minutes.

In case you get the same error message, maybe the libjvm.so file has not been found because it is in deep.

If so, run the AppRun in the AppDir, it is the core of the Appimage

cd vlc.AppDir
./AppRun

in the directory junest-backups search the file "libjvm.so" and try to copy/drag&drop it in /usr/lib, at hat point the message shoul change. If not, you should drag/drop the whole directory structure where the library was placed.

For each error message, try to drag/drop the library it was looking for from junest-backups to the AppDir, respecting the structure, and then

./AppRun

or better

LD_DEBUG=libs ./AppRun

if you read the script, its not difficult... maybe we can place jdk-openjdk in DEPENDENCES= to include the full JAVA support (but the archive become bigger, I can upload a VLC+ release for this).

Have fun.

kenderipa commented 8 months ago

All right, I've tried what you proposed. I've

  1. Copied the libjvm.so to ~/ArchImage/base/usr/lib
  2. Copied the libjvm.so to ~/ArchImage/base/usr/lib/jvm/java-21-openjdk/lib/server (exactly where I've found in junest-backups)

Afterwards, I ran LD_DEBUG=libs ./AppRun

 67207:     /usr/lib/libaacs.so.0: error: symbol lookup error: undefined symbol: bdplus_get_code_date (fatal)
 67207:     find library=libjvm.so [0]; searching
 67207:      search cache=/etc/ld.so.cache
 67207:      search path=/usr/lib           (system search path)
 67207:       trying file=/usr/lib/libjvm.so
 67207:

bdj.c:795: BD-J check: Failed to load JVM library 67207: find library=libjvm.so [0]; searching 67207: search cache=/etc/ld.so.cache 67207: search path=/usr/lib (system search path) 67207: trying file=/usr/lib/libjvm.so 67207: bdj.c:795: BD-J check: Failed to load JVM library [00007f8c100019a0] libbluray demux: First play: 0, Top menu: 0 HDMV Titles: 2, BD-J Titles: 87, Other: 87 [00007f8c100019a0] libbluray demux error: BD-J menus not supported. Playing without menus. BD-J support: 1, JVM found: 0, JVM usable: 0

As you can see, nothing changed. No further libraries that I could copy.

ivan-hc commented 8 months ago

Not in /base, in /vlc.AppDir/.junest/usr/lib

The AppDir is the structure of the AppImage, /base is the package vlc extracted during the process, you don't need it anymore

Focus your work on vlc.AppDir/.junest

kenderipa commented 8 months ago

Not in /base, in /vlc.AppDir/.junest/usr/lib

The AppDir is the structure of the AppImage, /base is the package vlc extracted during the process, you don't need it anymore

Focus your work on vlc.AppDir/.junest

Thanks!

Pasted it in the same two folders, but in /vlc.AppDir/.junest/usr/lib. Afterwards it asked about libbluray-j2se-1.3.4.jar. Found it under ~/ArchImage/junest-backups/usr/share/java/, copied it with the folder structure to /vlc.AppDir/.junest/. Then it asked about libbluray-awt-j2se-1.3.4.jar, it was in the same folder. Copied it, started ./AppRun, and VLC crashed. Some logs:

 69513:     /usr/lib/libaacs.so.0: error: symbol lookup error: undefined symbol: bdplus_get_code_date (fatal)
 69513:     find library=libjvm.so [0]; searching
 69513:      search cache=/etc/ld.so.cache
 69513:      search path=/usr/lib           (system search path)
 69513:       trying file=/usr/lib/libjvm.so
 69513:
 69513:
 69513:     calling init: /usr/lib/libjvm.so
 69513:
 69513:
 69513:     calling fini: /usr/lib/libjvm.so [0]
 69513:

[00007f48c4001130] libbluray demux: First play: 1, Top menu: 1 HDMV Titles: 2, BD-J Titles: 87, Other: 0 69513: find library=libjvm.so [0]; searching 69513: search cache=/etc/ld.so.cache 69513: search path=/usr/lib (system search path) 69513: trying file=/usr/lib/libjvm.so 69513: 69513: 69513: calling init: /usr/lib/libjvm.so 69513: Error occurred during initialization of VM Failed setting boot class path.

I think it may be the wrong Java version. VLC in the past was known to crash with newer (>8u332) JAva version. What should I put under BASICSTUFF to pull a Java version 17 (since I know it works)?

ivan-hc commented 8 months ago

You said 17? https://archlinux.org/packages/?sort=&q=openjdk&maintainer=&flagged=

I think https://archlinux.org/packages/extra/x86_64/jdk17-openjdk/ or something.

I would also try to export /usr/share/java at this point

XDG_DATA_DIRS=/usr/share/java ./AppRun

I'm not sure but this should check the JAVA's data dir from the host

kenderipa commented 8 months ago

With Java 17 it still crushed with same errors. Why does it inits libjvm.so and then directly finishes it, though?

ivan-hc commented 8 months ago

I think that the key is this message:

Error occurred during initialization of VM
Failed setting boot class path.

This is a JAVA error, you should investigate on that.

ivan-hc commented 8 months ago

Seen the above message, I think that we can also try to export an environment variable to add in the AppRun script that redirects to the local JAVA-related environment (also Emacs needs extra environment variables).

kenderipa commented 8 months ago

Seen the above message, I think that we can also try to export an environment variable to add in the AppRun script that redirects to the local JAVA-related environment (also Emacs needs extra environment variables).

The one above? Tried it, dind't work. Also copied its content to .junest, didn't work.

ivan-hc commented 8 months ago

What if you run the AppRun like this?

XDG_DATA_DIRS=/usr/share ./AppRun

and where is the path of the "jvm" directory on your /usr/lib, on the host? Maybe we should export that too, like this

XDG_DATA_DIRS=/usr/share LD_LIBRARY_PATH=/usr/lib/path/to/jvm ./AppRun
ivan-hc commented 8 months ago

If included in the AppRun, it should look like this

#!/bin/sh
HERE="$(dirname "$(readlink -f $0)")"
export UNION_PRELOAD=$HERE
export JUNEST_HOME=$HERE/.junest
export XDG_DATA_DIRS=/usr/share/
export LD_LIBRARY_PATH=/usr/lib/path-to/jvm
export PATH=$PATH:$HERE/.local/share/junest/bin
mkdir -p $HOME/.cache
if test -f /etc/resolv.conf; then
    ETC_RESOLV=' --bind /etc/resolv.conf /etc/resolv.conf ' # NEEDED TO CONNECT THE INTERNET
fi
EXEC=$(grep -e '^Exec=.*' "${HERE}"/*.desktop | head -n 1 | cut -d "=" -f 2- | sed -e 's|%.||g')
$HERE/.local/share/junest/bin/junest -n -b "$ETC_RESOLV" -- $EXEC "$@"
kenderipa commented 8 months ago

Doesn't seem to work, either.

ivan-hc commented 8 months ago

Use the command

find /usr/lib -type d -name jvm

if the result is only one, then replace the content of the AppRun, like this

#!/bin/sh
HERE="$(dirname "$(readlink -f $0)")"
export UNION_PRELOAD=$HERE
export JUNEST_HOME=$HERE/.junest
export XDG_DATA_DIRS=/usr/share
JVM_LIBS_PATH=$(find /usr/lib -type d -name jvm)
export LD_LIBRARY_PATH="$JVM_LIBS_PATH"
export PATH=$PATH:$HERE/.local/share/junest/bin
mkdir -p $HOME/.cache
if test -f /etc/resolv.conf; then
    ETC_RESOLV=' --bind /etc/resolv.conf /etc/resolv.conf ' # NEEDED TO CONNECT THE INTERNET
fi
EXEC=$(grep -e '^Exec=.*' "${HERE}"/*.desktop | head -n 1 | cut -d "=" -f 2- | sed -e 's|%.||g')
$HERE/.local/share/junest/bin/junest -n -b "$ETC_RESOLV" -- $EXEC "$@"
ivan-hc commented 8 months ago

Also, I think we should export the JAVA-related directories in /etc from the host, being them responsible of execution of binaries related tu systemd/java processes

kenderipa commented 8 months ago

I have two entries: /usr/lib/debug/usr/lib/jvm and /usr/lib/jvm. So took the second one and exported it like this: JVM_LIBS_PATH=/usr/lib/jwm

Didn't help, VLC still crushes.

kenderipa commented 8 months ago

Also, I think we should export the JAVA-related directories in /etc from the host, being them responsible of execution of binaries related tu systemd/java processes

As which variable?

ivan-hc commented 8 months ago

Then use just one, copy/paste this

#!/bin/sh
HERE="$(dirname "$(readlink -f $0)")"
export UNION_PRELOAD=$HERE
export JUNEST_HOME=$HERE/.junest
export XDG_DATA_DIRS=/usr/share
export LD_LIBRARY_PATH=/usr/lib/jvm
export PATH=$PATH:$HERE/.local/share/junest/bin
mkdir -p $HOME/.cache
if test -f /etc/resolv.conf; then
    ETC_RESOLV=' --bind /etc/resolv.conf /etc/resolv.conf ' # NEEDED TO CONNECT THE INTERNET
fi
EXEC=$(grep -e '^Exec=.*' "${HERE}"/*.desktop | head -n 1 | cut -d "=" -f 2- | sed -e 's|%.||g')
$HERE/.local/share/junest/bin/junest -n -b "$ETC_RESOLV" -- $EXEC "$@"

if this is not enough, create a directory jvm, so vlc.AppDir/usr/lib/jvm

and then try this other AppRun

#!/bin/sh
HERE="$(dirname "$(readlink -f $0)")"
export UNION_PRELOAD=$HERE
export JUNEST_HOME=$HERE/.junest
export XDG_DATA_DIRS=/usr/share
export PATH=$PATH:$HERE/.local/share/junest/bin
mkdir -p $HOME/.cache
if test -f /etc/resolv.conf; then
    ETC_RESOLV=' --bind /etc/resolv.conf /etc/resolv.conf ' # NEEDED TO CONNECT THE INTERNET
fi
EXEC=$(grep -e '^Exec=.*' "${HERE}"/*.desktop | head -n 1 | cut -d "=" -f 2- | sed -e 's|%.||g')
$HERE/.local/share/junest/bin/junest -n -b "$ETC_RESOLV --bind /usr/lib/jvm /usr/lib/jvm" -- $EXEC "$@"

this will mount the libraries from the host to the Arch Linux container

kenderipa commented 8 months ago

jwm

You mean jvm, right?

ivan-hc commented 8 months ago

yes, I was wrong... the same directory you have on the system (I've read your comment, I'm wrong with you)

ivan-hc commented 8 months ago

I've just corrected the comment above

kenderipa commented 8 months ago

yes, I was wrong... the same directory you have on the system (I've read your comment, I'm wrong with you)

Year, sorry, my bad too. However, it still didn't help thing. VLC still crashes.

ivan-hc commented 8 months ago

messages?

kenderipa commented 8 months ago
130698:     /usr/lib/libaacs.so.0: error: symbol lookup error: undefined symbol: bdplus_get_code_date (fatal)
130698:     find library=libjvm.so [0]; searching
130698:      search cache=/etc/ld.so.cache
130698:      search path=/usr/lib           (system search path)
130698:       trying file=/usr/lib/libjvm.so
130698:
130698:
130698:     calling init: /usr/lib/jvm/java-17-openjdk/lib/server/libjvm.so
130698:
130698:
130698:     calling fini: /usr/lib/jvm/java-17-openjdk/lib/server/libjvm.so [0]
130698:

[00007f0e78001130] libbluray demux: First play: 1, Top menu: 1 HDMV Titles: 2, BD-J Titles: 87, Other: 0 130698: find library=libjvm.so [0]; searching 130698: search cache=/etc/ld.so.cache 130698: search path=/usr/lib (system search path) 130698: trying file=/usr/lib/libjvm.so 130698: 130698: 130698: calling init: /usr/lib/jvm/java-17-openjdk/lib/server/libjvm.so 130698: Error occurred during initialization of VM Failed setting boot class path.

Nothing new or interesting.

kenderipa commented 8 months ago

It seems to use mounted folders, though.

kenderipa commented 8 months ago

All right, I'll compile it once again and will try it with the latest AppRun.

ivan-hc commented 8 months ago

Error occurred during initialization of VM Failed setting boot class path.

This is the point, what are the files JAVA is looking for to start the JAVA Virtual Machine?

It seems to use mounted folders, though.

Yes, I know this. Bubblewrap works this way.

We should mount all JAVA-related directories the same way we have done with the libraries

In your /etc, what is the directory? If there is a /etc/java-openjdk directory you should create one in vlc.AppDir/.junest/etc and copy/paste this AppRun

#!/bin/sh
HERE="$(dirname "$(readlink -f $0)")"
export UNION_PRELOAD=$HERE
export JUNEST_HOME=$HERE/.junest
export XDG_DATA_DIRS=/usr/share
export PATH=$PATH:$HERE/.local/share/junest/bin
mkdir -p $HOME/.cache
if test -f /etc/resolv.conf; then
    ETC_RESOLV=' --bind /etc/resolv.conf /etc/resolv.conf ' # NEEDED TO CONNECT THE INTERNET
fi
EXEC=$(grep -e '^Exec=.*' "${HERE}"/*.desktop | head -n 1 | cut -d "=" -f 2- | sed -e 's|%.||g')
$HERE/.local/share/junest/bin/junest -n -b "$ETC_RESOLV --bind /usr/lib/jvm /usr/lib/jvm --bind /etc/java-openjdk /etc/java-openjdk" -- $EXEC "$@"
kenderipa commented 8 months ago

[0.121s][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.121s][warning][jni,resolve] Re-registering of platform native method: org.videolan.Libbluray.getAacsDataN(JI)[B from code in a different classloader [0.121s][warning][jni,resolve] Re-registering of platform native method: org.videolan.Libbluray.getUOMaskN(J)J from code in a different classloader [0.121s][warning][jni,resolve] Re-registering of platform native method: org.videolan.Libbluray.setUOMaskN(JZZ)V from code in a different classloader [0.121s][warning][jni,resolve] Re-registering of platform native method: org.videolan.Libbluray.setKeyInterestN(JI)V from code in a different classloader [0.121s][warning][jni,resolve] Re-registering of platform native method: org.videolan.Libbluray.getTitleInfosN(J)[Lorg/videolan/TitleInfo; from code in a different classloader [0.121s][warning][jni,resolve] Re-registering of platform native method: org.videolan.Libbluray.getPlaylistInfoN(JI)Lorg/videolan/PlaylistInfo; from code in a different classloader [0.121s][warning][jni,resolve] Re-registering of platform native method: org.videolan.Libbluray.seekN(JIIJ)J from code in a different classloader [0.121s][warning][jni,resolve] Re-registering of platform native method: org.videolan.Libbluray.selectPlaylistN(JIIIJ)I from code in a different classloader [0.121s][warning][jni,resolve] Re-registering of platform native method: org.videolan.Libbluray.selectTitleN(JI)I from code in a different classloader [0.121s][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.121s][warning][jni,resolve] Re-registering of platform native method: org.videolan.Libbluray.selectAngleN(JI)I from code in a different classloader [0.121s][warning][jni,resolve] Re-registering of platform native method: org.videolan.Libbluray.soundEffectN(JI)I from code in a different classloader [0.121s][warning][jni,resolve] Re-registering of platform native method: org.videolan.Libbluray.tellTimeN(J)J from code in a different classloader [0.121s][warning][jni,resolve] Re-registering of platform native method: org.videolan.Libbluray.selectRateN(JFI)I from code in a different classloader [0.121s][warning][jni,resolve] Re-registering of platform native method: org.videolan.Libbluray.writeRegN(JIIII)I from code in a different classloader [0.121s][warning][jni,resolve] Re-registering of platform native method: org.videolan.Libbluray.readRegN(JII)I from code in a different classloader [0.121s][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.121s][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.121s][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.121s][warning][jni,resolve] Re-registering of platform native method: org.videolan.Libbluray.updateGraphicN(JII[IIIII)V from code in a different classloader register_native.c:41: Failed to locate class java/awt/BDFontMetrics Exception in thread "main" PrintStream.java:java.io.PrintStream.println:1054: java.lang.UnsatisfiedLinkError: /usr/lib/jvm/java-17-openjdk-amd64/lib/libawt_xawt.so: libXtst.so.6: cannot open shared object file: No such file or directory

PrintStream.java:java.io.PrintStream.println:1054: at java.base/jdk.internal.loader.NativeLibraries.load(Native Method)

PrintStream.java:java.io.PrintStream.println:1054: at java.base/jdk.internal.loader.NativeLibraries$NativeLibraryImpl.open(NativeLibraries.java:388)

PrintStream.java:java.io.PrintStream.println:1054: at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:232)

PrintStream.java:java.io.PrintStream.println:1054: at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:174)

PrintStream.java:java.io.PrintStream.println:1054: at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2394)

PrintStream.java:java.io.PrintStream.println:1054: at java.base/java.lang.Runtime.load0(Runtime.java:755)

PrintStream.java:java.io.PrintStream.println:1054: at java.base/java.lang.System.load(System.java:1957)

PrintStream.java:java.io.PrintStream.println:1054: at java.base/jdk.internal.loader.NativeLibraries.load(Native Method)

PrintStream.java:java.io.PrintStream.println:1054: at java.base/jdk.internal.loader.NativeLibraries$NativeLibraryImpl.open(NativeLibraries.java:388)

PrintStream.java:java.io.PrintStream.println:1054: at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:232)

PrintStream.java:java.io.PrintStream.println:1054: at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:174)

PrintStream.java:java.io.PrintStream.println:1054: at java.base/jdk.internal.loader.NativeLibraries.findFromPaths(NativeLibraries.java:315)

PrintStream.java:java.io.PrintStream.println:1054: at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:285)

PrintStream.java:java.io.PrintStream.println:1054: at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2403)

PrintStream.java:java.io.PrintStream.println:1054: at java.base/java.lang.Runtime.loadLibrary0(Runtime.java:818)

PrintStream.java:java.io.PrintStream.println:1054: at java.base/java.lang.System.loadLibrary(System.java:1993)

PrintStream.java:java.io.PrintStream.println:1054: at java.desktop/java.awt.Toolkit$2.run(Toolkit.java:1388)

PrintStream.java:java.io.PrintStream.println:1054: at java.desktop/java.awt.Toolkit$2.run(Toolkit.java:1386)

PrintStream.java:java.io.PrintStream.println:1054: at java.base/java.security.AccessController.doPrivileged(AccessController.java:318)

PrintStream.java:java.io.PrintStream.println:1054: at java.desktop/java.awt.Toolkit.loadLibraries(Toolkit.java:1385)

PrintStream.java:java.io.PrintStream.println:1054: at java.desktop/java.awt.Toolkit.initStatic(Toolkit.java:1423)

PrintStream.java:java.io.PrintStream.println:1054: at java.desktop/java.awt.Toolkit.(Toolkit.java:1397)

PrintStream.java:java.io.PrintStream.println:1054: at java.desktop/java.awt.FontMetrics.(FontMetrics.java:103)

register_native.c:41: Failed to locate class java/awt/BDGraphicsBase Exception in thread "main" PrintStream.java:java.io.PrintStream.println:1054: java.lang.NoClassDefFoundError: Could not initialize class java.awt.Toolkit

PrintStream.java:java.io.PrintStream.println:1054: at java.desktop/java.awt.Color.(Color.java:277)

PrintStream.java:java.io.PrintStream.println:1054: at java.desktop/java.awt.BDGraphicsBase.(BDGraphicsBase.java:44)

PrintStream.java:java.io.PrintStream.println:1054: Caused by: java.lang.ExceptionInInitializerError: Exception java.lang.UnsatisfiedLinkError: /usr/lib/jvm/java-17-openjdk-amd64/lib/libawt_xawt.so: libXtst.so.6: cannot open shared object file: No such file or directory [in thread "main"]

PrintStream.java:java.io.PrintStream.println:1054: at java.base/jdk.internal.loader.NativeLibraries.load(Native Method)

PrintStream.java:java.io.PrintStream.println:1054: at java.base/jdk.internal.loader.NativeLibraries$NativeLibraryImpl.open(NativeLibraries.java:388)

PrintStream.java:java.io.PrintStream.println:1054: at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:232)

PrintStream.java:java.io.PrintStream.println:1054: at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:174)

PrintStream.java:java.io.PrintStream.println:1054: at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2394)

PrintStream.java:java.io.PrintStream.println:1054: at java.base/java.lang.Runtime.load0(Runtime.java:755)

PrintStream.java:java.io.PrintStream.println:1054: at java.base/java.lang.System.load(System.java:1957)

PrintStream.java:java.io.PrintStream.println:1054: at java.base/jdk.internal.loader.NativeLibraries.load(Native Method)

PrintStream.java:java.io.PrintStream.println:1054: at java.base/jdk.internal.loader.NativeLibraries$NativeLibraryImpl.open(NativeLibraries.java:388)

PrintStream.java:java.io.PrintStream.println:1054: at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:232)

PrintStream.java:java.io.PrintStream.println:1054: at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:174)

PrintStream.java:java.io.PrintStream.println:1054: at java.base/jdk.internal.loader.NativeLibraries.findFromPaths(NativeLibraries.java:315)

PrintStream.java:java.io.PrintStream.println:1054: at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:285)

PrintStream.java:java.io.PrintStream.println:1054: at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2403)

PrintStream.java:java.io.PrintStream.println:1054: at java.base/java.lang.Runtime.loadLibrary0(Runtime.java:818)

PrintStream.java:java.io.PrintStream.println:1054: at java.base/java.lang.System.loadLibrary(System.java:1993)

PrintStream.java:java.io.PrintStream.println:1054: at java.desktop/java.awt.Toolkit$2.run(Toolkit.java:1388)

PrintStream.java:java.io.PrintStream.println:1054: at java.desktop/java.awt.Toolkit$2.run(Toolkit.java:1386)

PrintStream.java:java.io.PrintStream.println:1054: at java.base/java.security.AccessController.doPrivileged(AccessController.java:318)

PrintStream.java:java.io.PrintStream.println:1054: at java.desktop/java.awt.Toolkit.loadLibraries(Toolkit.java:1385)

PrintStream.java:java.io.PrintStream.println:1054: at java.desktop/java.awt.Toolkit.initStatic(Toolkit.java:1423)

PrintStream.java:java.io.PrintStream.println:1054: at java.desktop/java.awt.Toolkit.(Toolkit.java:1397)

PrintStream.java:java.io.PrintStream.println:1054: at java.desktop/java.awt.FontMetrics.(FontMetrics.java:103)

bdj.c:751: Couldn't register native methods. 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:69: getProperty(user.dir): no context ! java.base/java.lang.System.getProperty(System.java:919) 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.(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:840) org.videolan.BDJLoader:0: ERROR: loadN() failed: java.lang.NoClassDefFoundError: Could not initialize class java.awt.Toolkit java.desktop/java.awt.Component.(Component.java:624) 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:840) Caused by: java.lang.ExceptionInInitializerError: Exception java.lang.UnsatisfiedLinkError: /usr/lib/jvm/java-17-openjdk-amd64/lib/libawt_xawt.so: libXtst.so.6: cannot open shared object file: No such file or directory [in thread "main"] java.base/jdk.internal.loader.NativeLibraries.load(Native Method) java.base/jdk.internal.loader.NativeLibraries$NativeLibraryImpl.open(NativeLibraries.java:388) java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:232) java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:174) java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2394) java.base/java.lang.Runtime.load0(Runtime.java:755) java.base/java.lang.System.load(System.java:1957) java.base/jdk.internal.loader.NativeLibraries.load(Native Method) java.base/jdk.internal.loader.NativeLibraries$NativeLibraryImpl.open(NativeLibraries.java:388) java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:232) java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:174) java.base/jdk.internal.loader.NativeLibraries.findFromPaths(NativeLibraries.java:315) java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:285) java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2403) java.base/java.lang.Runtime.loadLibrary0(Runtime.java:818) java.base/java.lang.System.loadLibrary(System.java:1993) java.desktop/java.awt.Toolkit$2.run(Toolkit.java:1388) java.desktop/java.awt.Toolkit$2.run(Toolkit.java:1386) java.base/java.security.AccessController.doPrivileged(AccessController.java:318) java.desktop/java.awt.Toolkit.loadLibraries(Toolkit.java:1385) java.desktop/java.awt.Toolkit.initStatic(Toolkit.java:1423) java.desktop/java.awt.Toolkit.(Toolkit.java:1397) java.desktop/java.awt.FontMetrics.(FontMetrics.java:103)

Correct folder for me is /etc/java-17-openjdk

ivan-hc commented 8 months ago

Now?

#!/bin/sh
HERE="$(dirname "$(readlink -f $0)")"
export UNION_PRELOAD=$HERE
export JUNEST_HOME=$HERE/.junest
export PATH=$PATH:$HERE/.local/share/junest/bin
mkdir -p $HOME/.cache
if test -d /usr/lib/jvm; then
    LIB_JVM=' --bind /usr/lib/jvm /usr/lib/jvm '
fi
if test -d /etc/java-openjdk; then
    ETC_JAVA_OPENJDK_DIR=$(find /usr/lib -type d -name *java*openjdk* | head -1)
    ETC_JAVA_OPENJDK=' --bind '$ETC_JAVA_OPENJDK_DIR' /etc/java-openjdk '
fi
if test -f /etc/resolv.conf; then
    ETC_RESOLV=' --bind /etc/resolv.conf /etc/resolv.conf ' # NEEDED TO CONNECT THE INTERNET
fi
EXEC=$(grep -e '^Exec=.*' "${HERE}"/*.desktop | head -n 1 | cut -d "=" -f 2- | sed -e 's|%.||g')
$HERE/.local/share/junest/bin/junest -n -b "$ETC_RESOLV $ETC_JAVA_OPENJDK $LIB_JVM" -- $EXEC "$@"
ivan-hc commented 8 months ago

also I see this

register_native.c:41: Failed to locate class java/awt/BDFontMetrics

maybe this is in /usr/share, you should find the correct directory

ivan-hc commented 8 months ago

I have found this topic about the error above https://forum.videolan.org/viewtopic.php?t=160477

Maybe we should export a JAVA_HOME environment variable

The easier way is always to use --bind the way we have done in these latest comments

ivan-hc commented 8 months ago

I'm not sure but if a /usr/share/java directory exists, you should create and mount it too in vlc.AppDir/usr/share/java, then

#!/bin/sh
HERE="$(dirname "$(readlink -f $0)")"
export UNION_PRELOAD=$HERE
export JUNEST_HOME=$HERE/.junest
export PATH=$PATH:$HERE/.local/share/junest/bin
mkdir -p $HOME/.cache
if test -d /usr/share/java; then
    SHARE_JAVA=' --bind /usr/share/java /usr/share/java '
fi
if test -d /usr/lib/jvm; then
    LIB_JVM=' --bind /usr/lib/jvm /usr/lib/jvm '
fi
if test -d /etc/java-openjdk; then
    ETC_JAVA_OPENJDK_DIR=$(find /usr/lib -type d -name *java*openjdk* | head -1)
    ETC_JAVA_OPENJDK=' --bind '$ETC_JAVA_OPENJDK_DIR' /etc/java-openjdk '
fi
if test -f /etc/resolv.conf; then
    ETC_RESOLV=' --bind /etc/resolv.conf /etc/resolv.conf ' # NEEDED TO CONNECT THE INTERNET
fi
EXEC=$(grep -e '^Exec=.*' "${HERE}"/*.desktop | head -n 1 | cut -d "=" -f 2- | sed -e 's|%.||g')
$HERE/.local/share/junest/bin/junest -n -b "$ETC_RESOLV $ETC_JAVA_OPENJDK $LIB_JVM $SHARE_JAVA" -- $EXEC "$@"
kenderipa commented 8 months ago

Nope.

[00007f93a0001130] libbluray demux: First play: 1, Top menu: 1 HDMV Titles: 2, BD-J Titles: 87, Other: 0 [0.136s][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.137s][warning][jni,resolve] Re-registering of platform native method: org.videolan.Libbluray.getAacsDataN(JI)[B from code in a different classloader [0.137s][warning][jni,resolve] Re-registering of platform native method: org.videolan.Libbluray.getUOMaskN(J)J from code in a different classloader [0.137s][warning][jni,resolve] Re-registering of platform native method: org.videolan.Libbluray.setUOMaskN(JZZ)V from code in a different classloader [0.137s][warning][jni,resolve] Re-registering of platform native method: org.videolan.Libbluray.setKeyInterestN(JI)V from code in a different classloader [0.137s][warning][jni,resolve] Re-registering of platform native method: org.videolan.Libbluray.getTitleInfosN(J)[Lorg/videolan/TitleInfo; from code in a different classloader [0.137s][warning][jni,resolve] Re-registering of platform native method: org.videolan.Libbluray.getPlaylistInfoN(JI)Lorg/videolan/PlaylistInfo; from code in a different classloader [0.137s][warning][jni,resolve] Re-registering of platform native method: org.videolan.Libbluray.seekN(JIIJ)J from code in a different classloader [0.137s][warning][jni,resolve] Re-registering of platform native method: org.videolan.Libbluray.selectPlaylistN(JIIIJ)I from code in a different classloader [0.137s][warning][jni,resolve] Re-registering of platform native method: org.videolan.Libbluray.selectTitleN(JI)I from code in a different classloader [0.137s][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.137s][warning][jni,resolve] Re-registering of platform native method: org.videolan.Libbluray.selectAngleN(JI)I from code in a different classloader [0.137s][warning][jni,resolve] Re-registering of platform native method: org.videolan.Libbluray.soundEffectN(JI)I from code in a different classloader [0.137s][warning][jni,resolve] Re-registering of platform native method: org.videolan.Libbluray.tellTimeN(J)J from code in a different classloader [0.137s][warning][jni,resolve] Re-registering of platform native method: org.videolan.Libbluray.selectRateN(JFI)I from code in a different classloader [0.137s][warning][jni,resolve] Re-registering of platform native method: org.videolan.Libbluray.writeRegN(JIIII)I from code in a different classloader [0.137s][warning][jni,resolve] Re-registering of platform native method: org.videolan.Libbluray.readRegN(JII)I from code in a different classloader [0.137s][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.137s][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.137s][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.137s][warning][jni,resolve] Re-registering of platform native method: org.videolan.Libbluray.updateGraphicN(JII[IIIII)V from code in a different classloader register_native.c:41: Failed to locate class java/awt/BDFontMetrics Exception in thread "main" PrintStream.java:java.io.PrintStream.println:1054: java.lang.InternalError: Error loading java.security file

PrintStream.java:java.io.PrintStream.println:1054: at java.base/java.security.Security.initialize(Security.java:106)

PrintStream.java:java.io.PrintStream.println:1054: at java.base/java.security.Security$1.run(Security.java:84)

PrintStream.java:java.io.PrintStream.println:1054: at java.base/java.security.Security$1.run(Security.java:82)

PrintStream.java:java.io.PrintStream.println:1054: at java.base/java.security.AccessController.doPrivileged(AccessController.java:318)

PrintStream.java:java.io.PrintStream.println:1054: at java.base/java.security.Security.(Security.java:82)

PrintStream.java:java.io.PrintStream.println:1054: at java.base/sun.security.util.SecurityProperties.getOverridableProperty(SecurityProperties.java:57)

PrintStream.java:java.io.PrintStream.println:1054: at java.base/sun.security.util.SecurityProperties.privilegedGetOverridable(SecurityProperties.java:48)

PrintStream.java:java.io.PrintStream.println:1054: at java.base/sun.security.util.SecurityProperties.includedInExceptions(SecurityProperties.java:72)

PrintStream.java:java.io.PrintStream.println:1054: at java.base/sun.security.util.SecurityProperties.(SecurityProperties.java:36)

PrintStream.java:java.io.PrintStream.println:1054: at java.base/sun.security.util.FilePermCompat.(FilePermCompat.java:45)

PrintStream.java:java.io.PrintStream.println:1054: at java.base/java.security.AccessControlContext.(AccessControlContext.java:269)

PrintStream.java:java.io.PrintStream.println:1054: at java.base/java.security.AccessController.createWrapper(AccessController.java:647)

PrintStream.java:java.io.PrintStream.println:1054: at java.base/java.security.AccessController.doPrivileged(AccessController.java:460)

PrintStream.java:java.io.PrintStream.println:1054: at java.base/java.util.ResourceBundle$ResourceBundleProviderHelper.loadResourceBundle(ResourceBundle.java:3614)

PrintStream.java:java.io.PrintStream.println:1054: at java.base/java.util.ResourceBundle.loadBundle(ResourceBundle.java:1837)

PrintStream.java:java.io.PrintStream.println:1054: at java.base/java.util.ResourceBundle.findBundle(ResourceBundle.java:1768)

PrintStream.java:java.io.PrintStream.println:1054: at java.base/java.util.ResourceBundle.findBundle(ResourceBundle.java:1722)

PrintStream.java:java.io.PrintStream.println:1054: at java.base/java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1656)

PrintStream.java:java.io.PrintStream.println:1054: at java.base/java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1575)

PrintStream.java:java.io.PrintStream.println:1054: at java.base/java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1549)

PrintStream.java:java.io.PrintStream.println:1054: at java.base/java.util.ResourceBundle.getBundle(ResourceBundle.java:858)

PrintStream.java:java.io.PrintStream.println:1054: at java.desktop/java.awt.Toolkit$4.run(Toolkit.java:1414)

PrintStream.java:java.io.PrintStream.println:1054: at java.desktop/java.awt.Toolkit$4.run(Toolkit.java:1411)

PrintStream.java:java.io.PrintStream.println:1054: at java.base/java.security.AccessController.doPrivileged(AccessController.java:318)

PrintStream.java:java.io.PrintStream.println:1054: at java.desktop/java.awt.Toolkit.initStatic(Toolkit.java:1410)

PrintStream.java:java.io.PrintStream.println:1054: at java.desktop/java.awt.Toolkit.(Toolkit.java:1397)

PrintStream.java:java.io.PrintStream.println:1054: at java.desktop/java.awt.FontMetrics.(FontMetrics.java:103)

register_native.c:41: Failed to locate class java/awt/BDGraphicsBase Exception in thread "main" PrintStream.java:java.io.PrintStream.println:1054: java.lang.NoClassDefFoundError: Could not initialize class java.awt.Toolkit

PrintStream.java:java.io.PrintStream.println:1054: at java.desktop/java.awt.Color.(Color.java:277)

PrintStream.java:java.io.PrintStream.println:1054: at java.desktop/java.awt.BDGraphicsBase.(BDGraphicsBase.java:44)

PrintStream.java:java.io.PrintStream.println:1054: Caused by: java.lang.ExceptionInInitializerError: Exception java.lang.InternalError: Error loading java.security file [in thread "main"]

PrintStream.java:java.io.PrintStream.println:1054: at java.base/java.security.Security.initialize(Security.java:106)

PrintStream.java:java.io.PrintStream.println:1054: at java.base/java.security.Security$1.run(Security.java:84)

PrintStream.java:java.io.PrintStream.println:1054: at java.base/java.security.Security$1.run(Security.java:82)

PrintStream.java:java.io.PrintStream.println:1054: at java.base/java.security.AccessController.doPrivileged(AccessController.java:318)

PrintStream.java:java.io.PrintStream.println:1054: at java.base/java.security.Security.(Security.java:82)

PrintStream.java:java.io.PrintStream.println:1054: at java.base/sun.security.util.SecurityProperties.getOverridableProperty(SecurityProperties.java:57)

PrintStream.java:java.io.PrintStream.println:1054: at java.base/sun.security.util.SecurityProperties.privilegedGetOverridable(SecurityProperties.java:48)

PrintStream.java:java.io.PrintStream.println:1054: at java.base/sun.security.util.SecurityProperties.includedInExceptions(SecurityProperties.java:72)

PrintStream.java:java.io.PrintStream.println:1054: at java.base/sun.security.util.SecurityProperties.(SecurityProperties.java:36)

PrintStream.java:java.io.PrintStream.println:1054: at java.base/sun.security.util.FilePermCompat.(FilePermCompat.java:45)

PrintStream.java:java.io.PrintStream.println:1054: at java.base/java.security.AccessControlContext.(AccessControlContext.java:269)

PrintStream.java:java.io.PrintStream.println:1054: at java.base/java.security.AccessController.createWrapper(AccessController.java:647)

PrintStream.java:java.io.PrintStream.println:1054: at java.base/java.security.AccessController.doPrivileged(AccessController.java:460)

PrintStream.java:java.io.PrintStream.println:1054: at java.base/java.util.ResourceBundle$ResourceBundleProviderHelper.loadResourceBundle(ResourceBundle.java:3614)

PrintStream.java:java.io.PrintStream.println:1054: at java.base/java.util.ResourceBundle.loadBundle(ResourceBundle.java:1837)

PrintStream.java:java.io.PrintStream.println:1054: at java.base/java.util.ResourceBundle.findBundle(ResourceBundle.java:1768)

PrintStream.java:java.io.PrintStream.println:1054: at java.base/java.util.ResourceBundle.findBundle(ResourceBundle.java:1722)

PrintStream.java:java.io.PrintStream.println:1054: at java.base/java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1656)

PrintStream.java:java.io.PrintStream.println:1054: at java.base/java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1575)

PrintStream.java:java.io.PrintStream.println:1054: at java.base/java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1549)

PrintStream.java:java.io.PrintStream.println:1054: at java.base/java.util.ResourceBundle.getBundle(ResourceBundle.java:858)

PrintStream.java:java.io.PrintStream.println:1054: at java.desktop/java.awt.Toolkit$4.run(Toolkit.java:1414)

PrintStream.java:java.io.PrintStream.println:1054: at java.desktop/java.awt.Toolkit$4.run(Toolkit.java:1411)

PrintStream.java:java.io.PrintStream.println:1054: at java.base/java.security.AccessController.doPrivileged(AccessController.java:318)

PrintStream.java:java.io.PrintStream.println:1054: at java.desktop/java.awt.Toolkit.initStatic(Toolkit.java:1410)

PrintStream.java:java.io.PrintStream.println:1054: at java.desktop/java.awt.Toolkit.(Toolkit.java:1397)

PrintStream.java:java.io.PrintStream.println:1054: at java.desktop/java.awt.FontMetrics.(FontMetrics.java:103)

bdj.c:751: Couldn't register native methods. 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 Exception in thread "main" PrintStream.java:java.io.PrintStream.println:1054: java.lang.NoClassDefFoundError: Could not initialize class java.security.Security

PrintStream.java:java.io.PrintStream.println:1054: at java.base/java.lang.SecurityManager$1.run(SecurityManager.java:1348)

PrintStream.java:java.io.PrintStream.println:1054: at java.base/java.lang.SecurityManager$1.run(SecurityManager.java:1346)

PrintStream.java:java.io.PrintStream.println:1054: at java.base/java.security.AccessController.doPrivileged(AccessController.java:318)

PrintStream.java:java.io.PrintStream.println:1054: at java.base/java.lang.SecurityManager.checkPackageAccess(SecurityManager.java:1345)

PrintStream.java:java.io.PrintStream.println:1054: at java.base/org.videolan.BDJSecurityManager.checkPackageAccess(BDJSecurityManager.java:275)

PrintStream.java:java.io.PrintStream.println:1054: at java.base/java.lang.System.implSetSecurityManager(System.java:428)

PrintStream.java:java.io.PrintStream.println:1054: at java.base/java.lang.System.setSecurityManager(System.java:406)

PrintStream.java:java.io.PrintStream.println:1054: at java.base/org.videolan.Libbluray.setSecurityManager(Libbluray.java:137)

PrintStream.java:java.io.PrintStream.println:1054: at java.base/org.videolan.Libbluray.init(Libbluray.java:392)

PrintStream.java:java.io.PrintStream.println:1054: Caused by: java.lang.ExceptionInInitializerError: Exception java.lang.InternalError: Error loading java.security file [in thread "main"]

PrintStream.java:java.io.PrintStream.println:1054: at java.base/java.security.Security.initialize(Security.java:106)

PrintStream.java:java.io.PrintStream.println:1054: at java.base/java.security.Security$1.run(Security.java:84)

PrintStream.java:java.io.PrintStream.println:1054: at java.base/java.security.Security$1.run(Security.java:82)

PrintStream.java:java.io.PrintStream.println:1054: at java.base/java.security.AccessController.doPrivileged(AccessController.java:318)

PrintStream.java:java.io.PrintStream.println:1054: at java.base/java.security.Security.(Security.java:82)

PrintStream.java:java.io.PrintStream.println:1054: at java.base/sun.security.util.SecurityProperties.getOverridableProperty(SecurityProperties.java:57)

PrintStream.java:java.io.PrintStream.println:1054: at java.base/sun.security.util.SecurityProperties.privilegedGetOverridable(SecurityProperties.java:48)

PrintStream.java:java.io.PrintStream.println:1054: at java.base/sun.security.util.SecurityProperties.includedInExceptions(SecurityProperties.java:72)

PrintStream.java:java.io.PrintStream.println:1054: at java.base/sun.security.util.SecurityProperties.(SecurityProperties.java:36)

PrintStream.java:java.io.PrintStream.println:1054: at java.base/sun.security.util.FilePermCompat.(FilePermCompat.java:45)

PrintStream.java:java.io.PrintStream.println:1054: at java.base/java.security.AccessControlContext.(AccessControlContext.java:269)

PrintStream.java:java.io.PrintStream.println:1054: at java.base/java.security.AccessController.createWrapper(AccessController.java:647)

PrintStream.java:java.io.PrintStream.println:1054: at java.base/java.security.AccessController.doPrivileged(AccessController.java:460)

PrintStream.java:java.io.PrintStream.println:1054: at java.base/java.util.ResourceBundle$ResourceBundleProviderHelper.loadResourceBundle(ResourceBundle.java:3614)

PrintStream.java:java.io.PrintStream.println:1054: at java.base/java.util.ResourceBundle.loadBundle(ResourceBundle.java:1837)

PrintStream.java:java.io.PrintStream.println:1054: at java.base/java.util.ResourceBundle.findBundle(ResourceBundle.java:1768)

PrintStream.java:java.io.PrintStream.println:1054: at java.base/java.util.ResourceBundle.findBundle(ResourceBundle.java:1722)

PrintStream.java:java.io.PrintStream.println:1054: at java.base/java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1656)

PrintStream.java:java.io.PrintStream.println:1054: at java.base/java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1575)

PrintStream.java:java.io.PrintStream.println:1054: at java.base/java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1549)

PrintStream.java:java.io.PrintStream.println:1054: at java.base/java.util.ResourceBundle.getBundle(ResourceBundle.java:858)

PrintStream.java:java.io.PrintStream.println:1054: at java.desktop/java.awt.Toolkit$4.run(Toolkit.java:1414)

PrintStream.java:java.io.PrintStream.println:1054: at java.desktop/java.awt.Toolkit$4.run(Toolkit.java:1411)

PrintStream.java:java.io.PrintStream.println:1054: at java.base/java.security.AccessController.doPrivileged(AccessController.java:318)

PrintStream.java:java.io.PrintStream.println:1054: at java.desktop/java.awt.Toolkit.initStatic(Toolkit.java:1410)

PrintStream.java:java.io.PrintStream.println:1054: at java.desktop/java.awt.Toolkit.(Toolkit.java:1397)

PrintStream.java:java.io.PrintStream.println:1054: at java.desktop/java.awt.FontMetrics.(FontMetrics.java:103)

bdj.c:782: Failed to initialize BD-J (uncaught exception) Libbluray.java:org.videolan.Libbluray.shutdown:439: shutdown() failed: java.lang.NoClassDefFoundError: Could not initialize class org.videolan.GUIManager

Caused by: java.lang.ExceptionInInitializerError: Exception java.lang.NoClassDefFoundError: Could not initialize class java.awt.Toolkit [in thread "BDJLoader.BDJActionQueue"]
    java.desktop/java.awt.Component.<clinit>(Component.java:624)
    java.base/org.videolan.BDJLoader.unloadN(BDJLoader.java:317)
    java.base/org.videolan.BDJLoader.access$300(BDJLoader.java:46)
    java.base/org.videolan.BDJLoader$BDJLoaderAction.doAction(BDJLoader.java:365)
    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:840)

register_native.c:73: Failed to locate class java/awt/BDGraphicsBase Exception in thread "main" PrintStream.java:java.io.PrintStream.println:1054: java.lang.NoClassDefFoundError: Could not initialize class java.awt.BDGraphicsBase

PrintStream.java:java.io.PrintStream.println:1054: Caused by: java.lang.ExceptionInInitializerError: Exception java.lang.NoClassDefFoundError: Could not initialize class java.awt.Toolkit [in thread "main"]

PrintStream.java:java.io.PrintStream.println:1054: at java.desktop/java.awt.Color.(Color.java:277)

PrintStream.java:java.io.PrintStream.println:1054: at java.desktop/java.awt.BDGraphicsBase.(BDGraphicsBase.java:44)

register_native.c:73: Failed to locate class java/awt/BDFontMetrics Exception in thread "main" PrintStream.java:java.io.PrintStream.println:1054: java.lang.NoClassDefFoundError: Could not initialize class java.awt.BDFontMetrics

PrintStream.java:java.io.PrintStream.println:1054: Caused by: java.lang.ExceptionInInitializerError: Exception java.lang.InternalError: Error loading java.security file [in thread "main"]

PrintStream.java:java.io.PrintStream.println:1054: at java.base/java.security.Security.initialize(Security.java:106)

PrintStream.java:java.io.PrintStream.println:1054: at java.base/java.security.Security$1.run(Security.java:84)

PrintStream.java:java.io.PrintStream.println:1054: at java.base/java.security.Security$1.run(Security.java:82)

PrintStream.java:java.io.PrintStream.println:1054: at java.base/java.security.AccessController.doPrivileged(AccessController.java:318)

PrintStream.java:java.io.PrintStream.println:1054: at java.base/java.security.Security.(Security.java:82)

PrintStream.java:java.io.PrintStream.println:1054: at java.base/sun.security.util.SecurityProperties.getOverridableProperty(SecurityProperties.java:57)

PrintStream.java:java.io.PrintStream.println:1054: at java.base/sun.security.util.SecurityProperties.privilegedGetOverridable(SecurityProperties.java:48)

PrintStream.java:java.io.PrintStream.println:1054: at java.base/sun.security.util.SecurityProperties.includedInExceptions(SecurityProperties.java:72)

PrintStream.java:java.io.PrintStream.println:1054: at java.base/sun.security.util.SecurityProperties.(SecurityProperties.java:36)

PrintStream.java:java.io.PrintStream.println:1054: at java.base/sun.security.util.FilePermCompat.(FilePermCompat.java:45)

PrintStream.java:java.io.PrintStream.println:1054: at java.base/java.security.AccessControlContext.(AccessControlContext.java:269)

PrintStream.java:java.io.PrintStream.println:1054: at java.base/java.security.AccessController.createWrapper(AccessController.java:647)

PrintStream.java:java.io.PrintStream.println:1054: at java.base/java.security.AccessController.doPrivileged(AccessController.java:460)

PrintStream.java:java.io.PrintStream.println:1054: at java.base/java.util.ResourceBundle$ResourceBundleProviderHelper.loadResourceBundle(ResourceBundle.java:3614)

PrintStream.java:java.io.PrintStream.println:1054: at java.base/java.util.ResourceBundle.loadBundle(ResourceBundle.java:1837)

PrintStream.java:java.io.PrintStream.println:1054: at java.base/java.util.ResourceBundle.findBundle(ResourceBundle.java:1768)

PrintStream.java:java.io.PrintStream.println:1054: at java.base/java.util.ResourceBundle.findBundle(ResourceBundle.java:1722)

PrintStream.java:java.io.PrintStream.println:1054: at java.base/java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1656)

PrintStream.java:java.io.PrintStream.println:1054: at java.base/java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1575)

PrintStream.java:java.io.PrintStream.println:1054: at java.base/java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1549)

PrintStream.java:java.io.PrintStream.println:1054: at java.base/java.util.ResourceBundle.getBundle(ResourceBundle.java:858)

PrintStream.java:java.io.PrintStream.println:1054: at java.desktop/java.awt.Toolkit$4.run(Toolkit.java:1414)

PrintStream.java:java.io.PrintStream.println:1054: at java.desktop/java.awt.Toolkit$4.run(Toolkit.java:1411)

PrintStream.java:java.io.PrintStream.println:1054: at java.base/java.security.AccessController.doPrivileged(AccessController.java:318)

PrintStream.java:java.io.PrintStream.println:1054: at java.desktop/java.awt.Toolkit.initStatic(Toolkit.java:1410)

PrintStream.java:java.io.PrintStream.println:1054: at java.desktop/java.awt.Toolkit.(Toolkit.java:1397)

PrintStream.java:java.io.PrintStream.println:1054: at java.desktop/java.awt.FontMetrics.(FontMetrics.java:103)

bluray.c:3310: Can't play BD-J title 65535 [00007f93a0001130] libbluray demux: Closing overlays.

kenderipa commented 8 months ago

Could you perhaps add complete Java packages? The image will be fatter, but overall much easier.

ivan-hc commented 8 months ago

Try yourself using the script, try to rebuild VLC using the stock script. Create a new directory and again:

wget https://raw.githubusercontent.com/ivan-hc/VLC-appimage/main/vlc-junest.sh
chmod a+x ./vlc-junest.sh

and add the required dependences you think that work from this list https://archlinux.org/packages/?q=jdk to the environment variable "DEPENDENCES=", on top of the script.

For more tests, I suggest to install JuNest and find the correct way to made VLC work the way you want, and then report your searches to the script.

You should do all this, I don't use Blu-rays, so all changes I can do wold be in a blind way. I can't help with this.

ivan-hc commented 8 months ago

On the other hand, I suggest to study the logs and find the solution by adding the missing files and use --bind to expand the directory tha Archimage should mount into the container.

This is the more convenient way to act, being my AppRun using a very easy syntax to learn, you don't need to made the Appimage bloated.

If you success, then I can port your searches to the main script and made it work for all.

kenderipa commented 8 months ago

I'll try full Java installation first. However, even here I'm doing something wrong. Even with jdk17-openjdk, jre17-openjdk and jre17-openjdk-headless as dependencies the AppImage ist still about 124 megs.

ivan-hc commented 8 months ago

In the stock script I use in this repository, the head is this:

#!/bin/sh

# NAME OF THE APP BY REPLACING "SAMPLE"
APP=vlc
BIN="$APP" #CHANGE THIS IF THE NAME OF THE BINARY IS DIFFERENT FROM "$APP" (for example, the binary of "obs-studio" is "obs")
DEPENDENCES="ca-certificates libaacs libbluray libbdplus libdvdcss libdvdnav libdvdread zvbi"
BASICSTUFF="binutils gzip"
COMPILERS="base-devel"

add the dependences in DEPENDENCES, not in BASICSTUFF as we have done at the very start. It was to get only necessary libraries, not the whole JAVA environment.

Also

BINSAVED="certificates SAVEBINSPLEASE" # Enter here keywords to find and save in /usr/bin
SHARESAVED="certificates qt" # Enter here keywords or file/folder names to save in both /usr/share and /usr/lib
LIBSAVED="pk p11 alsa jack libaacs libbluray libbdplus libdvdcss libdvdnav libdvdread pipewire pulse v4l" # Enter here keywords or file/folder names to save in /usr/lib

you must add a keyword where it is needed, for example, in SHARESAVED "java", in LIBSAVED "jvm", and so on.

This part is needed to give keywords to the function, so, for example, if a file/directory has "jvm" or "pulse" in the name, it will be find and imported to the AppImage.

As you can see, in libsaved there ar some keywords:

pk p11 alsa jack libaacs libbluray libbdplus libdvdcss libdvdnav libdvdread pipewire pulse v4l

you must add "jvm" to them. The whole directory /usr/lib/jvm will be imported.

You must read the title of each section (all uppercased and stating with "#"), so the instructions are already in place.