简体   繁体   English

为什么Maven没有显示正确的OS版本

[英]Why maven is not showing correct OS version

I recently upgraded from Windows 8.1 to Windows 10. 我最近从Windows 8.1升级到Windows 10。

And I installed Maven on my machine. 然后我在机器上安装了Maven。 When I checked the version of Maven by running mvn --version it showed Windows 8.1. 当我通过运行mvn --version检查Maven的版本时,它显示的是Windows 8.1。 I installed maven on windows 10 only. 我仅在Windows 10上安装了Maven。

What is happening here? 这是怎么回事 Why is Maven unable to get current OS version? 为什么Maven无法获得当前的操作系统版本?

Windows OS reports version codes that have to be translated to the name of a particular Windows release given by Microsoft's marketing team. Windows操作系统报告版本代码,这些版本代码必须转换为Microsoft营销团队提供的特定Windows版本的名称。 For example, it will return 6.0 for Windows Vista and 6.3 for Windows 8.1 例如,对于Windows Vista,它将返回6.0;对于Windows 8.1,它将返回6.3。

https://msdn.microsoft.com/en-us/library/windows/desktop/ms724832(v=vs.85).aspx https://msdn.microsoft.com/zh-cn/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. 对于Windows 10,该API确实的确返回了10.0,但是Maven的将版本号转换为市场名称的代码可能并不期望这种一致性。 Maven will likely be updated at some point in the future to correctly display Windows 10. Maven可能会在将来的某个时刻进行更新,以正确显示Windows 10。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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