jpackage issue with --dest
Maurizio Cimadamore
maurizio.cimadamore at oracle.com
Wed Jun 16 13:11:38 UTC 2021
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
More information about the core-libs-dev
mailing list