On Fri, Apr 20, 2012 at 9:12 PM, Doug Palmer wrote:
> There's a useful little system property set called sun.arch.data.model that
> izpack can access via SYSTEM_sun_arch_data_model. The following bit of
> configuration sets two conditions: arch64 and arch32 which you can use.
I believe this only tells you if the JVM is 32 or 64 bit, not the
underlying OS. I.e. You could have a 32bit JVM running under a 64bit
OS.
For Windows, you can check for the existence of the ProgramW6432
environment variable. This environment variable is only set for 64bit
versions of the OS.
For Linux, you can capture the output of "uname -m" command to determine
if 32bit or 64bit. The 'arch' command can also be used.
For a 32bit OS, you will get one of the following strings for the
architecture:
i386
i486
i586
i686
For 64bit Linux, you will get:
x86_64
--ewh