久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

Java 的“os.name"適用于 Windows 10?

Java#39;s quot;os.namequot; for Windows 10?(Java 的“os.name適用于 Windows 10?)
本文介紹了Java 的“os.name"適用于 Windows 10?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

問題描述

限時送ChatGPT賬號..

在Java中,我們可以通過查看os.name的屬性值來知道底層操作系統(tǒng)的名稱:System.getProperty("os.name").

In Java, we can see the property value of os.name to know the name of the underlying operating system: System.getProperty("os.name").

對于每個版本的 Windows,它總是返回操作系統(tǒng)的確切名稱:Windows XP 表示 XP,Windows Vista 表示 Vista,Windows 7 代表 7,Windows 8.1 代表 8.1,依此類推...

For each edition of Windows, it used to return always the exact name of the OS: Windows XP for XP, Windows Vista for Vista, Windows 7 for Seven, Windows 8.1 for 8.1, and so on...

問題是:我剛剛使用發(fā)布的 Microsoft 更新程序?qū)⑽业?Windows 8.1 更新到了 Windows 10,而且這個屬性似乎仍然存在 Windows 8.1:

The problem is: I just updated my Windows 8.1 to Windows 10 using the released Microsoft updater, and it seems like this property still remains Windows 8.1:

public class OSTest {
  public static void main(String[] args) {
    System.out.println(System.getProperty("os.name"));
  }
}

如何為此創(chuàng)建解決方法?而且,有誰知道如果安裝新的 Windows 10 副本,這個問題是否仍然存在 - 也就是說,這個錯誤是由 Microsoft 自動更新程序引起的 - ?

How can I create a workaround for this? And, does anyone know if this problem persists if installing a fresh Windows 10 copy - that is, this bug is caused by the Microsoft auto-updater -?

推薦答案

這是一個已知問題 JDK-8066504 已在即將發(fā)布的 Java 8 更新 60 中修復(fù).

This is a known problem JDK-8066504 that has been fixed in upcoming Java 8 update 60.

原因是 GetVersionEx 函數(shù)的行為自Windows 8.1.

The reason is GetVersionEx function has changed its behavior since Windows 8.1.

有多種可能的解決方法,請參閱 MSDN 文章.

There are multiple possible workarounds, see MSDN article.

最簡單的就是執(zhí)行cmd.exe/c ver.

另一種是查看其中一個系統(tǒng)文件的版本信息,例如kernel32.dll.

The other is to look at the version information of one of the system files, e.g. kernel32.dll.

這篇關(guān)于Java 的“os.name"適用于 Windows 10?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請聯(lián)系我們刪除處理,感謝您的支持!

相關(guān)文檔推薦

Parsing an ISO 8601 string local date-time as if in UTC(解析 ISO 8601 字符串本地日期時間,就像在 UTC 中一樣)
How to convert Gregorian string to Gregorian Calendar?(如何將公歷字符串轉(zhuǎn)換為公歷?)
Java: What/where are the maximum and minimum values of a GregorianCalendar?(Java:GregorianCalendar 的最大值和最小值是什么/在哪里?)
Calendar to Date conversion for dates before 15 Oct 1582. Gregorian to Julian calendar switch(1582 年 10 月 15 日之前日期的日歷到日期轉(zhuǎn)換.公歷到儒略歷切換)
java Calendar setFirstDayOfWeek not working(java日歷setFirstDayOfWeek不起作用)
Java: getting current Day of the Week value(Java:獲取當(dāng)前星期幾的值)
主站蜘蛛池模板: 亚洲精品欧美 | 亚洲一区久久 | 日韩激情在线 | 国产精品国产三级国产aⅴ中文 | 男人天堂网址 | 日韩国产一区二区三区 | 中文在线一区二区 | av色站| 99精彩视频 | 日韩一区精品 | 一区二区三区高清 | 成人国产精品色哟哟 | 国产美女一区二区 | 国产亚洲成av人在线观看导航 | 久久亚洲欧美日韩精品专区 | 日韩av免费在线电影 | 正在播放一区二区 | 性高湖久久久久久久久3小时 | 欧美成人激情视频 | 日韩精品一区二区三区在线 | 国产成人99| 青青草网站在线观看 | 欧美不卡一区二区三区 | 日韩伦理一区二区 | 亚洲国产精品久久久久 | 亚洲国产成人精品久久久国产成人一区 | 国产精品中文字幕在线 | 欧美性猛交一区二区三区精品 | 黄色一级免费观看 | www成年人视频 | 久久综合国产 | 国产激情综合五月久久 | 欧美精品成人影院 | 91在线精品一区二区 | 欧美日韩一卡二卡 | av乱码 | 三级在线免费 | 精品网站999 | 欧美一级欧美一级在线播放 | 久久久91 | 精品综合视频 |