Reference

Packaging your app

Turn your jars into a double-clickable app that bundles its own Java runtime with jpackage, about 32 MB in size.

jpackage turns your jars into a double-clickable app that bundles its own Java runtime, so your users do not need Java installed.

Build an app image

Collect your app jar and its dependencies in one folder (here target\package), then point jpackage at it:

jpackage --type app-image --name MyApp `
  --input target\package `
  --main-jar my-app.jar --main-class com.example.MyApp `
  --java-options "--enable-native-access=ALL-UNNAMED" `
  --add-modules "java.base,java.logging,jdk.unsupported" `
  --jlink-options "--strip-debug --no-man-pages --no-header-files --compress zip-6" `
  --dest dist

That gives an app of about 32 MB, compared with about 120 MB without --add-modules and --jlink-options. Add the modules your own dependencies need. Code signing is up to you.

In practice

Parsel ships this way: a Windows installer of about 33 MB with its own Java runtime inside, plus a portable zip and Linux packages. There is no bundled browser, because the app uses the web view your system already has.