eclipse / jifa

🔬 Online Heap Dump, GC Log, Thread Dump & JFR File Analyzer.
https://eclipse.github.io/jifa/
Eclipse Public License 2.0
546 stars 96 forks source link

Is there any intention to use "jpackage" to package applications under various operating systems? #313

Open youngledo opened 9 hours ago

youngledo commented 9 hours ago

Currently "jifa" only supports Docker or shell scripts to run, which is not very convenient.

Starting from Java 14, it is supported to package a jar package (jpacket) into a runnable application. Please refer to: https://docs.oracle.com/en/java/javase/17/jpackage/packaging-overview.html#GUID-C1027043-587D-418D-8188-EF8F44A4C06A

I have tried successfully packaging under macOS with the following command:

jpackage --input ./lib --name "Eclipse Jifa" \
        --icon jifa.icns --vendor "Eclipse" --app-version 1.0.0 --main-jar jifa.jar \
        --java-options "'--add-opens=java.base/java.lang=ALL-UNNAMED' '--add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED' '-Djdk.util.zip.disableZip64ExtraFieldValidation=true'"

At the same time, this configuration needs to be enabled:

image

The final effect, as shown in the figure:

image
youngledo commented 9 hours ago

Of course, if you want to use "jpackage" you need to modify the build script(Sorry, I can't help but participate in the script modification, I haven't quite figured out how this build works).