How can I tell if I'm running in 64-bit JVM or 32-bit JVM (from within a program)?

前端 未结 12 1801
滥情空心
滥情空心 2020-11-22 09:39

How can I tell if the JVM in which my application runs is 32 bit or 64-bit? Specifically, what functions or properties I can used to detect this within the program?

12条回答
  •  醉酒成梦
    2020-11-22 10:20

    To get the version of JVM currently running the program

    System.out.println(Runtime.class.getPackage().getImplementationVersion());
    

提交回复
热议问题