RFR: 8150442: Enforce Supported Platforms in Packager for MSI bundles
Alexey Semenyuk
asemenyuk at openjdk.org
Fri Feb 7 03:52:11 UTC 2025
On Thu, 6 Feb 2025 22:26:37 GMT, Alexander Matveev <almatvee at openjdk.org> wrote:
> Do you know what versions in PE headers of the main launcher and java.dll we have in JDK 25?
The major version is 6, and the minor version is 0. [List of Windows versions](https://learn.microsoft.com/en-us/windows/win32/sysinfo/operating-system-version)
> Do you know how versions in PE header are being set,
Linker sets them. See [linker option](https://learn.microsoft.com/en-us/cpp/build/reference/version-version-information?view=msvc-170).
> is it being updated between JDK releases?
I don't think so. Version is picked from the [manifest file](https://github.com/openjdk/jdk/blob/3989a199578fc1d91988cfdbb95f11dd6d4c7b81/src/java.base/windows/native/launcher/java.manifest) for launchers:
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application>
<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/>
<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/>
<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/>
</application>
</compatibility>
[The same manifest file in jdk11](https://github.com/openjdk/jdk11u/blob/master/src/java.base/windows/native/launcher/java.manifest) has the same contents.
Seems like the linker picks the lowest compatible version from the manifest and puts it in the PE header.
I don't know how major/minor OS versions are configured for dll-s but they are consistent with the launchers.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/23472#issuecomment-2641882872
More information about the core-libs-dev
mailing list