RFR: 8357404: jpackage should attempt to get a package version from the JDK's release file if the --version option is not specified [v9]

Alexey Semenyuk asemenyuk at openjdk.org
Tue Feb 10 00:21:11 UTC 2026


On Mon, 9 Feb 2026 22:28:27 GMT, Alexander Matveev <almatvee at openjdk.org> wrote:

>> test/jdk/tools/jpackage/share/NoMPathRuntimeTest.java line 99:
>> 
>>> 97:                 Files.createDirectories(workDir.resolve("Contents/MacOS"));
>>> 98:             }
>>> 99:         }
>> 
>> I don't understand the comment. Why is this change?
>
> `MacBundle.fromPath()` will fail if we do not have at least "Contents/Home", "Contents/Info.plist" and "Contents/MacOS". `ModuleInfo.fromCookedRuntime()` will be called from this test and it will fail as a result, since `MacBundle.fromPath()` will consider provided by test runtime as image.

Oh, so this is a bug in the test. Would you accept an alternative patch that refactors the test?
[NoMPathRuntimeTest.java.patch](https://github.com/user-attachments/files/25196864/NoMPathRuntimeTest.java.patch)

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

PR Review Comment: https://git.openjdk.org/jdk/pull/29260#discussion_r2785168298


More information about the core-libs-dev mailing list