Hi Bernd,
The issue with the infinite directory tree you observe looks like a
duplicate of [1].
You can add "--verbose" option to jpackage command line to get more
details on what is going on with jpackage.
There is no way to configure the list of directories where native
launcher is looking for the corresponding config file.
[1] https://bugs.openjdk.org/browse/JDK-8325089
- Alexey
On 7/29/2024 4:00 PM, Bernd Eckenfels wrote:
Hello,
I noticed some jpackage pecularities:
1 - if you use "-i ." (and no target) it will not ignore its target
directory and recursively copy itself generating a massive deep directory
tree hard to remove.
Sample command:
jpackage --type app-image -n MyApp --main-class myapp.Main --main-jar
myapp.jar -i .
creates MyApp\app\MyApp\app\...
It should either ignore its output dir or at least exit with an usage error
2 - when using additional launchers it prints a exception with not much more
info:
mkdir in
type in\A.cfg
[Application]
app.classpath=$APPDIR\myapp.jar
app.mainclass=myapp.Main
[JavaOptions]
java-options=-Djpackage.app-version=1.0
echo > in\myapp.jar # yes broken
jpackage --type app-image -n myapp --main-class myapp.Main --main-jar
myapp.jar -i in --win-console --add-launcher A=A.cfg
[21:38:14.825] Exception: A.cfg
It does contain the launcher and has the myapp\app\A.cfg file in there, so I
am not sure what the Exception is - does it try to start it?
Gruss
Bernd
PS: can i change the native launcher to not search the config in app\ but in
its own directory and also have it relative to bin\ directory (on Windows
similar to Linux). It does write the interName into the binary, but it
searches only .cfg files based on the filename.