检测 Java 是否运行在64bit 的JVM上的方法

2015-02-05 0 821
检测 Java 是否运行在64bit 的JVM上的方法
   public static boolean is64BitVM() {  
      String bits = System.getProperty("sun.arch.data.model");  
      if (bits != null) {  
         return bits.equals("64");  
      } else {  
         // probably sun.arch.data.model isn't available  
         // maybe not a Sun JVM?  
         // try with the vm.name property  
         return System.getProperty("java.vm.name").contains("64");  
      }   
    }  

遇见资源网 java 检测 Java 是否运行在64bit 的JVM上的方法 http://www.ox520.com/8451.html

常见问题

相关文章

发表评论
暂无评论
官方客服团队

为您解决烦忧 - 24小时在线 专业服务