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?
I installed 32-bit JVM and retried it again, looks like the following does tell you JVM bitness, not OS arch:
System.getProperty("os.arch");
#
# on a 64-bit Linux box:
# "x86" when using 32-bit JVM
# "amd64" when using 64-bit JVM
This was tested against both SUN and IBM JVM (32 and 64-bit). Clearly, the system property is not just the operating system arch.