To determine whether you are running in a 64-bit JVM or a 32-bit JVM from within a Java program, you can use the sun.arch.data.model system property.