Re: [External] : Re: JPackage does very weird things and it doesn't work with SNAP

2024-12-16 Thread Alexey Semenyuk
Hi Davide, Good to know the problem has been solved. I'm not sure it got solved in the right way, though :) Would you mind trying another fix? Instead of altering LD_LIBRARY_PATH env var, remove _JPACKAGE_LAUNCHER env var from the environment in the ProcessBuilder: --- ProcessBuilder process

Re: [External] : Re: JPackage does very weird things and it doesn't work with SNAP

2024-12-14 Thread Davide Perini
You got the point and solved the problem I was hitting for days in 1 minutes. I simply added this env variable to my snapcraft.yaml   LD_LIBRARY_PATH: $APPDIR:$LD_LIBRARY_PATH and this fixed it :) It reminds me this story: A man took his watch to a watchmaker for repair. The watchmaker exam

Re: [External] : Re: JPackage does very weird things and it doesn't work with SNAP

2024-12-11 Thread Alexey Semenyuk
Davide, Can you run the launcher with JPACKAGE_DEBUG env variable set to "true" on flatpak or anywhere else where it works? It should make the launcher print log messages to stdout. On Linux launcher's behavior depends on "LD_LIBRARY_PATH", "_JPACKAGE_LAUNCHER" env variables, see [1]. Laun

Re: JPackage does very weird things and it doesn't work with SNAP

2024-12-11 Thread Davide Perini
Hi, thanks for the answer, I really appreciate it. I tried adding the JPACKAGE_DEBUG env variable but didn't changed the output. When I run the binary generated by jpackage in the snap sandbox I get the "java" command output as output. This does not happen on flatpak. Do you know if jpackage

Re: JPackage does very weird things and it doesn't work with SNAP

2024-12-09 Thread Alexey Semenyuk
Hi Davide, An app launcher generated by jpackage runs `rpm` and `dpkg` queries to detect the package that owns it. Why does it need to know the name of the package? The app launcher needs to locate the corresponding ".cfg" (.cfg) file in the app image to read the startup configuration. If you

Re: JPackage does very weird things and it doesn't work with SNAP

2024-12-09 Thread Davide Perini
Apart this, in the current state I think jpackage is simply not suited to be used in conjunction with snaps and strictly confined containers because it simply don't do what is supposed to do. launching a jpackaged app and get the java command output is something clearly broken from the jpackag

Re: JPackage does very weird things and it doesn't work with SNAP

2024-12-08 Thread David Holmes
On 9/12/2024 1:21 pm, David Alayachew wrote: > If it's one of the expected ones, things will proceed normally. There are expected segfaults in libjvm? Sorry, I am 100% ignorant about this subject. I just wanted to know if that was the intended meaning. Yes there is a deliberate segfault dur

Re: JPackage does very weird things and it doesn't work with SNAP

2024-12-08 Thread David Alayachew
> If it's one of the expected ones, things will proceed normally. There are expected segfaults in libjvm? Sorry, I am 100% ignorant about this subject. I just wanted to know if that was the intended meaning. On Sun, Dec 8, 2024, 3:46 PM Kim Barrett wrote: > On 12/8/24 1:56 PM, Davide Perini wr

Re: JPackage does very weird things and it doesn't work with SNAP

2024-12-08 Thread Kim Barrett
On 12/8/24 1:56 PM, Davide Perini wrote: I tried attaching gdb, but it’s clear that jvm doesn’t like debuggers attached. Right from the start it got sigstop handlers invoked, and then a segfault in libjvm. I can't comment on the rest of your message, but I might be able to help with this. T

JPackage does very weird things and it doesn't work with SNAP

2024-12-08 Thread Davide Perini
Hi there... I have a JDK23 app that is packaged with jpackage. I am running this app in Snapcraft. It works well but I cannot restart it for a very weird problem. When I try to restart it with a simple code like this: ``` ArrayList cmdOutput = new ArrayList<>();     try {     **_Pro