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

Alexander Matveev almatvee at openjdk.org
Thu Feb 12 23:47:41 UTC 2026


On Thu, 12 Feb 2026 19:31:39 GMT, Alexey Semenyuk <asemenyuk at openjdk.org> wrote:

>> Alexander Matveev has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   8357404: jpackage should attempt to get a package version from the JDK's release file if the --version option is not specified [v9]
>
> src/jdk.jpackage/windows/classes/jdk/jpackage/internal/WinFromOptions.java line 142:
> 
>> 140:             // We should drop any characters. For example: "-ea".
>> 141:             return ver.toComponentsString();
>> 142:         }
> 
> If I understand the code correctly, and the `version` variable is set to "17.2", then the function will return "17.2", right? But if it is "17.2.1", it will return "17.2.1.0". Is this what we want?

Yes. We want to normalize only if version is not complaint with target package requirements. If normalization is required it will be always done to 4 components. 17 -> 17.0.0.0.

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

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


More information about the core-libs-dev mailing list