How do I detect which kind of JRE is installed — 32bit vs. 64bit
问题 During installation with an NSIS installer, I need to check which JRE (32bit vs 64bit) is installed on a system. I already know that I can check a system property \" sun.arch.data.model \", but this is Sun-specific. I\'m wondering if there is a standard solution for this. 回答1: The JVM architecture in use can be retrieved using the "os.arch" property: System.getProperty("os.arch"); The "os" part seems to be a bit of a misnomer, or perhaps the original designers did not expect JVMs to be