RFR: 8370969: --launcher-as-service option is ignored when used with --app-image option

Alexander Matveev almatvee at openjdk.org
Sat Nov 1 03:47:01 UTC 2025


On Thu, 30 Oct 2025 18:47:12 GMT, Alexey Semenyuk <asemenyuk at openjdk.org> wrote:

> - Fix jpackage to handle correctly the `--launcher-as-service` cli option when bundling a native bundle from the predefined app image.
>  - Rework `LauncherAsServiceVerifier` to make it work with `JPackageCommand` and `PackageTest`. This allows using it in tests when jpackage creates a native bundle from the predefined app image (`--app-image` option).
>  - Add relevant test cases to `ServiceTest`. The new test cases cover "launcher-as-service" feature for additional launchers.
>  - Fix `MacHelper.getPackageId()` to make it work when bundling a native bundle from the predefined app image.
> 
> Supplementary changes:
>  - Get rid of "thows IOException" from all method signatures in `CfgTest` and `TKit.traceFileContents()`. 
>  - Format `TKit.createTextFile()` and `TKit.createPropertiesFile()`.
>  - Add `JPackageCommand.mainLauncherName()`. It returns the same value as `JPackageCommand.name()`, but will fail if called in case or runtime bundling. Replace `JPackageCommand.name()` with `JPackageCommand.mainLauncherName()` where appropriate.
>  - Add the `PropertyFinder` class, which provides a declarative way to calculate the value of a property that may be sourced from one or a few cli options, a property in an additionl launcher property file, and a value in the app image file (.jpackage.xml).

Looks good.

-------------

Marked as reviewed by almatvee (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/28071#pullrequestreview-3406796740


More information about the core-libs-dev mailing list