Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The JVM architecture in use can be retrieved using the "<a href="http://java.sun.com/javase/6/docs/api/java/lang/System.html#getProperties()" rel="nofollow noreferrer">os.arch</a>" property:</p> <pre><code>System.getProperty("os.arch"); </code></pre> <p>The "os" part seems to be a bit of a misnomer, or perhaps the original designers did not expect JVMs to be running on architectures they weren't written for. Return values seem to be <a href="http://javablog.co.uk/2007/05/19/making-jni-cross-platform/" rel="nofollow noreferrer">inconsistent</a>.</p> <p>The NetBeans Installer team are <a href="http://wiki.netbeans.org/NBINotes" rel="nofollow noreferrer">tackling the issue</a> of JVM vs OS architecture. Quote:</p> <blockquote> <p><strong>x64 bit : Java and System</strong></p> <p>Tracked as the <a href="http://www.netbeans.org/issues/show_bug.cgi?id=143434" rel="nofollow noreferrer">Issue 143434</a>.</p> <p>Currently we using x64 bit of JVM to determine if system (and thus Platform.getHardwareArch()) is 64-bit or not. This is definitely wrong since it is possible to run 32bit JVM on 64bit system. We should find a solution to check OS real 64-bitness in case of running on 32-bit JVM.</p> <ul> <li>for Windows it can be done using WindowsRegistry.IsWow64Process()</li> <li>for Linux - by checking 'uname -m/-p' == x86_64</li> <li>for Solaris it can be done using e.g. 'isainfo -b'</li> <li>for Mac OSX it can't be done using uname arguments, probably it can be solved by creating of 64-bit binary and executing on the platform... (unfortunately, this does not work:( I've created binary only with x86_64 and ppc64 arch and it was successfully executed on Tiger..)</li> <li>for Generic Unix support - it is not clear as well... likely checking for the same 'uname -m/-p' / 'getconf LONG_BIT' and comparing it with some possible 64-bit values (x86_64, x64, amd64, ia64).</li> </ul> </blockquote> <hr> <p>Sample properties from different JVMs all running on 64bit Ubuntu 8.0.4:</p> <p>32bit IBM 1.5:</p> <pre><code>java.vendor=IBM Corporation java.vendor.url=http://www.ibm.com/ java.version=1.5.0 java.vm.info=J2RE 1.5.0 IBM J9 2.3 Linux x86-32 j9vmxi3223-20061001 (JIT enabled) J9VM - 20060915_08260_lHdSMR JIT - 20060908_1811_r8 GC - 20060906_AA java.vm.name=IBM J9 VM java.vm.specification.name=Java Virtual Machine Specification java.vm.specification.vendor=Sun Microsystems Inc. java.vm.specification.version=1.0 java.vm.vendor=IBM Corporation java.vm.version=2.3 os.arch=x86 os.name=Linux os.version=2.6.24-23-generic sun.arch.data.model=32 </code></pre> <p>64bit Sun 1.6:</p> <pre><code>java.vendor=Sun Microsystems Inc. java.vendor.url=http://java.sun.com/ java.vendor.url.bug=http://java.sun.com/cgi-bin/bugreport.cgi java.version=1.6.0_05 java.vm.info=mixed mode java.vm.name=Java HotSpot(TM) 64-Bit Server VM java.vm.specification.name=Java Virtual Machine Specification java.vm.specification.vendor=Sun Microsystems Inc. java.vm.specification.version=1.0 java.vm.vendor=Sun Microsystems Inc. java.vm.version=10.0-b19 os.arch=amd64 os.name=Linux os.version=2.6.24-23-generic sun.arch.data.model=64 </code></pre> <p>64bit GNU 1.5:</p> <pre><code>java.vendor=Free Software Foundation, Inc. java.vendor.url=http://gcc.gnu.org/java/ java.version=1.5.0 java.vm.info=GNU libgcj 4.2.4 (Ubuntu 4.2.4-1ubuntu3) java.vm.name=GNU libgcj java.vm.specification.name=Java(tm) Virtual Machine Specification java.vm.specification.vendor=Sun Microsystems Inc. java.vm.specification.version=1.0 java.vm.vendor=Free Software Foundation, Inc. java.vm.version=4.2.4 (Ubuntu 4.2.4-1ubuntu3) os.arch=x86_64 os.name=Linux os.version=2.6.24-23-generic </code></pre> <p>(The GNU version does not report the "sun.arch.data.model" property; presumably other JVMs don't either.)</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload