RFR: 8363980: [macos] Add JDK specific keys/values to Info.plist of embedded runtime

Alexander Matveev almatvee at openjdk.org
Thu Oct 30 22:37:06 UTC 2025


On Wed, 29 Oct 2025 03:36:19 GMT, Alexey Semenyuk <asemenyuk at openjdk.org> wrote:

>> - Added JDK specific keys/values to Info.plist of embedded runtime.
>> - Modified `setFakeRuntime()` not to include `bin` folder. By default it was always included, but generated embedded runtime by default does not have `bin` folder. As a result `CustomInfoPListTest` failed.
>> - Updated  `CustomInfoPListTest` to test Info.plist with `bin` folder.
>
> test/jdk/tools/jpackage/helpers/jdk/jpackage/test/JPackageCommand.java line 319:
> 
>> 317:                 // always something in application image.
>> 318:                 fakeRuntimeDir.resolve("bin").toFile().mkdir();
>> 319:                 createBulkFile.accept(fakeRuntimeDir.resolve(Path.of("bin", "bulk")));
> 
> This change makes the above `fakeRuntimeDir.resolve("bin").toFile().mkdir();` redundant. Overall, the whole
> 
> if (TKit.isLinux()) {
>     // Need to make the code in rpm spec happy as it assumes there is
>     // always something in application image.
>     fakeRuntimeDir.resolve("bin").toFile().mkdir();
> }
> 
> construction is redundant and can be replaced with:
> 
> if (includeBin) {
>     createBulkFile.accept(fakeRuntimeDir.resolve(Path.of("bin", "bulk")));
> }

We still need to add file to "bin" for Linux. I will change it to:

            // Need to make the code in rpm spec happy as it assumes there is
            // always something in application image.
            includeBin |= TKit.isLinux();

            if (includeBin) {
                createBulkFile.accept(fakeRuntimeDir.resolve(Path.of("bin", "bulk")));
            }

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

PR Review Comment: https://git.openjdk.org/jdk/pull/28033#discussion_r2479681605


More information about the core-libs-dev mailing list