jpackage nits

Bernd Eckenfels ecki at zusammenkunft.net
Mon Jul 29 20:00:01 UTC 2024


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.



More information about the core-libs-dev mailing list