Monday, July 30, 2012

32 bit JVM or 64 bit JVM

How can I tell if I'm running in 64-bit JVM or 32-bit JVM?

Sun has a Java System property to determine the bitness of the JVM: 32 or 64:

We can access it as follows:
System.getProperty("sun.arch.data.model") 

Way 2:
java -d64 -version
java -d32 -version