<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    jinfeng_wang

    G-G-S,D-D-U!

    BlogJava 首頁 新隨筆 聯系 聚合 管理
      400 Posts :: 0 Stories :: 296 Comments :: 0 Trackbacks
    http://tolstoy.com/samizdat/sysprops.html  
        ==》 給出了許多OS下的具體java.getproperties()的值

    http://www.rgagnon.com/javadetails/java-0150.html
        ==》
      

    I found that, on Windows 2003 server, the property value for "os.name" is actually "windows 2003." So either that has to be added to the bunch of tests or just relax the comparison strings a bit:

      else if ( (OS.indexOf("nt") > -1)
    || (OS.indexOf("windows 2000") > -1 )
    || (OS.indexOf("windows 2003") > -1 )  // works but is quite specific to 2003
    || (OS.indexOf("windows xp") > -1) ) {
    else if ( (OS.indexOf("nt") > -1)
    || (OS.indexOf("windows 20") > -1 )  // probably is better since no other OS would return "windows" anyway
    || (OS.indexOf("windows xp") > -1) ) {
    
    I started with "windows 200" but thought "what the hell" and made it "windows 20" to lengthen its longivity. You could push it further and use "windows 2," I suppose. The only thing to watch out for is to not overlap with "windows 9." 
     





    結論:
    如果可以,盡量使用變量,定義操作系統的類型,然后在不同的操作系統下修改操作系統類型的定義。否則,可能會隨著操作系統以后的變化,引入新的OS Name(畢竟無法保證可以對所有的OS Name進行充分的判斷)。
    posted on 2007-04-18 14:20 jinfeng_wang 閱讀(433) 評論(0)  編輯  收藏 所屬分類: javaZZ
    主站蜘蛛池模板: 亚洲精品tv久久久久久久久| 亚洲毛片一级带毛片基地| 三级网站免费观看| 亚洲人成亚洲精品| 国产高清免费观看| 日韩电影免费在线观看中文字幕| 亚洲一区二区三区亚瑟| 亚洲 另类 无码 在线| 无码人妻精品中文字幕免费| 亚洲欧美日韩国产精品一区| 国产亚洲综合成人91精品| 无码少妇一区二区浪潮免费| 一级毛片免费一级直接观看| 亚洲国产日韩在线人成下载| jizzjizz亚洲| 成人免费午夜在线观看| 特级做A爰片毛片免费看无码| 亚洲色在线无码国产精品不卡| 亚洲中文字幕无码不卡电影| 大地资源免费更新在线播放| 日韩精品无码免费一区二区三区| 国产亚洲欧美在线观看| 亚洲精品午夜视频| 亚洲三区在线观看无套内射| 日韩免费a级在线观看| 久久精品无码专区免费青青| 亚洲精品视频免费观看| 亚洲狠狠婷婷综合久久| 亚洲精品午夜在线观看| 亚洲精品中文字幕无码蜜桃| 国产男女猛烈无遮挡免费视频| 国产电影午夜成年免费视频| 99视频在线观看免费| 特级毛片在线大全免费播放| 亚洲人成网站18禁止| 亚洲精品视频观看| 久久久久无码精品亚洲日韩| 久久久久亚洲精品无码网址| 国产亚洲精品AA片在线观看不加载| 99久久免费国产香蕉麻豆| 日本视频在线观看永久免费|