Hi Maurizio,

This is not known issue.
Can you run the app with "JPACKAGE_DEBUG" env variable set to "true". In this case the app launcher will produce debug output that will help to understand why it can't find libjava.so.

- Alexey

On 6/16/2021 9:11 AM, Maurizio Cimadamore wrote:
Hi,
I'm relatively new to jpackage and I found a weird issue on linux where the name of a --dest folder can affect the correct behavior of the generated application image.

I have put together an hello world application, with a jarfile. If I jpackage it with the following command line:

```
$ jpackage --type app-image --name HelloWorld --input out/artifacts/jpackage_test_jar --main-jar jpackage-test.jar --dest output
```

Everything works correctly, and launching the generated app prints "Hello world":

```
$ output/HelloWorld/bin/HelloWorld
Hello world!
```

However, if the destination directory contains "bin" (even as a nested subfolder), there are issues. Here's the jextract command line:

```
$ jpackage --type app-image --name HelloWorld --input out/artifacts/jpackage_test_jar --main-jar jpackage-test.jar --dest bin
```

(the only thihng that changed is the --dest parameter)

And here's what I get:

```
$ bin/HelloWorld/bin/HelloWorld
Error: could not find libjava.so
Error: Could not find Java SE Runtime Environment.
```

I use Ubuntu 20.04. A colleague of mine using MacOS does not seem to have the same issue, so it seems to be system specific.

I'm using the latest jpackage from jdk/jdk.

Is this a known issue?

Cheers
Maurizio


Reply via email to