在Java代码中查看JDK的版本

1 public class JDKVersion {
2 
3     public static void main(String[] args) {
4         String arch = System.getProperty("sun.arch.data.model");
5         System.out.println(arch+"-bit");
6     }
7 }

结果:

posted on 2018-01-22 12:28  温馨世界  阅读(1576)  评论(0)    收藏  举报