简体   繁体   中英

Why maven is not showing correct OS version

I recently upgraded from Windows 8.1 to Windows 10.

And I installed Maven on my machine. When I checked the version of Maven by running mvn --version it showed Windows 8.1. I installed maven on windows 10 only.

What is happening here? Why is Maven unable to get current OS version?

Windows OS reports version codes that have to be translated to the name of a particular Windows release given by Microsoft's marketing team. For example, it will return 6.0 for Windows Vista and 6.3 for Windows 8.1

https://msdn.microsoft.com/en-us/library/windows/desktop/ms724832(v=vs.85).aspx

The API does indeed return 10.0 for Windows 10, but Maven's code to translate the version number to the marketing name likely did not expect such consistency. Maven will likely be updated at some point in the future to correctly display Windows 10.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM