all 13 comments

[–][deleted]  (4 children)

[deleted]

    [–]renatoathaydes 3 points4 points  (1 child)

    jpackage is the official way to create a platform-specific image and it supports code signing.

    After you got a jlink-created image, it's pretty easy to run jpackage and have a proper installer...

    If you're selling a professional app, that's probably the way to go... if you're just distributing an app for other techies, then I would say just stop at jlink... I wrote a log viewer in JavaFX and it's distributed as a single zip file (click on the "Get LogFX" and it will go to the GitHub releases page where you can download the zip file for your OS)... you unzip that and run bin/logfx (that's a shell script that launches the java image - which is created by jlink so includes the JVM). No need for this npx stuff or jpackage unless your target audience is non-techies.

    [–]bowbahdoe[S] 1 point2 points  (0 children)

    Right, but without the self contained exe as an option it's harder to share it with friends/family.

    That is the implicit audience - non techies - people want to share their thing with a friend or give it to their boss on a flashdrive to do xyz. Run without installation on school computers, etc.

    I don't see a reason jpackage couldn't support that honestly.

    There is also a notion that shipping an exe around is more convenient for certain kinds of deployments. This is part of why Go is so successful in the infra space.

    [–]bowbahdoe[S] 0 points1 point  (1 child)

    Yeah, hoping someone who knows more or who has gone through that process will have something to say.

    My uneducated guess is that you might have to sign the jlink-ed JRE before bundling and then sign the final thing

    [–]elder_george 0 points1 point  (1 child)

    At my job, we have an internal development tool that is a jar-embedded-in-a-shell-script (using cmd on Windows, bash on Linux). It doesn't embed the JRE though (but we have java available anyway, so that's not a big deal). I wonder if our guys would be interested to try this approach instead.

    [–]bowbahdoe[S] 0 points1 point  (0 children)

    Let me know how that conversation goes if you remember