How do you determine 32 or 64 bit architecture of Windows using Java?

后端 未结 9 2184
佛祖请我去吃肉
佛祖请我去吃肉 2020-11-30 03:02

How do you determine 32 or 64 bit architecture of Windows using Java?

9条回答
  •  醉酒成梦
    2020-11-30 03:34

    You can use the os.arch property in system properties to find out.

    Properties pr = System.getProperties();
    System.out.println(pr.getProperty("os.arch"));
    

    If you are on 32 bit, it should show i386 or something

提交回复
热议问题