Home > DeveloperSection > Forums > How we tell programmatically if I'm running in 64-bit JVM or 32-bit JVM
naomi burke
naomi burke

Total Post:28

Posted on    August-11-2015 11:55 PM

 Java Java  Javac 

 1 Reply(s)
 674  View(s)
Rate this:
How can I tell if the JVM my application runs in is 32 bit or 64-bit? Specifically, what function or preference do I access to detect this within the program?

Mayank Tripathi
Mayank Tripathi

Total Post:397

Posted on    August-12-2015 6:29 AM

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

sun.arch.data.model=32 // 32 bit JVM
sun.arch.data.model=64 // 64 bit JVM
You can use

to determine if its 32/64 from the program.

Don't want to miss updates? Please click the below button!

Follow MindStick