Java Packaging Tool: Create Native Packages to Deploy Java Applications by Kevin Rushforth

Devoxx · 15K views · 2019 · 30:48

Open on YouTube

Software practice, open source & careersSoftware (other)talkdated

Why Stack Overflow recommends it

Stack Overflow users link it when answering or asking about jpackage usage, such as packaging native installers, cross-platform limits, and invoking the tool through ToolProvider.

Recommended by 2 people across 2 different months, 2020 to 2022.

What it is

A 30-minute Devoxx talk by Kevin Rushforth of the Oracle Java team introducing jpackage, a JDK 14 tool that builds native installers (.exe, .msi, .dmg, .rpm, .deb) for Java applications. It explains how jpackage works alongside jlink to bundle the needed JDK modules and walks through example commands.

What people said

Recommends queeg · 2021-12 · Stack Overflow · on “How can I JPackage an RPM/PKG/DEB on Windows?”

If this guy's presentation is still up to date, jpackage does not support cross platform compilation or cross platform deployment. Just look at the first slide in [this video] The workaround may be to either involve the correct target machine or try yourself following [LINK]

Recommends tmmls · 2022-10 · Stack Overflow · on “cl.exe missing when building native app using GraalVM”

After 2 years struggling I gave up on trying to use GraalVM to build native executables. I now use the jPackage command line tool. It comes by default with the latest versions of Java. Works like a charm. No hassle, no additional dependencies, no errors, free, ... More info: [this video]

Cites StephanS · 2020-04 · Stack Overflow · on “can't find jpackage via ToolProvider”

short version: I'm trying to invoke jpackage from a gradle task but the ToolProvider returns null (or better a failed Optional). This is the case on AdoptOpenJDK 14.0.0 (sdkman identifier 14.0.0.hs-adpt) as well as on Java.net (i think that's Oracle OpenJDK!?) 14.0.1 (sdkman identifier 14.0.1-open). I'm using Gradle 6.3 (but this doesn't feel like a gradle issue). long version: I'm following this talk on jpackage [this video] , where at 12:12 the code to invoke jpackage from a build tool is displayed. (The official jpackage page [LINK] also mentions: In addition to the command-line interface, jpackage is accessible via the ToolProvider API (java.util.spi.ToolProvider) under the name "jpackage". )