During our investigation into the incorrect OS details displayed in APM for the new OS 2025, I made some intriguing discoveries. I have upgraded the server with the latest APMIA version 25.5.2.9. However, the server information was still being reported as "Windows Server 2016". On further examination, I noticed an environment variable had been set “JAVA_TOOL_OPTIONS= "-Dos.name=Windows Server 2016". I proceeded to remove this variable and then reinstalled APMIA. Despite these actions, the OS version remained unchanged in the system.
We then shifted our focus to troubleshooting another server. On inspection, we discovered that the environment variable "JAVA_TOOL_OPTIONS" was set to "-Dos.name=Windows Server 2016" for this server as well. We attempted to remove this setting and uninstall the APMIA, but encountered a Java error. Next, we updated the environment variable to "JAVA_TOOL_OPTIONS="-Dos.name=Windows Server 2019" and proceeded to install a newer version of APMIA. When we checked the OS version in APMIA, it displayed "Windows Server 2019". To further test the system's behavior, we uninstalled APMIA once more and modified the environment variable to "JAVA_TOOL_OPTIONS="-Dos.name=Windows Server 2025". After reinstalling APMIA, we observed that the OS version now showed "Windows Server 2025", confirming that the environment variable directly affecting the reported OS version.
Environment variable Java_Tools_Options somehow is set to OS value.
Workaround is setx java_tool_options "" -m in APMIA install script. then remove after install