Java JVM is 32 Bit is32BitJvm()

Here you can find the source of is32BitJvm()

Description

Uses the non-portable system property sun.arch.data.model to help determine if we are running on a 32-bit JVM.

License

Apache License

Return

true if we can determine definitively that this is a 32-bit JVM, otherwise false

Declaration

private static boolean is32BitJvm() 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {
    /**//from w ww. j  av a  2  s  .c  o m
     * Uses the non-portable system property sun.arch.data.model to help
     * determine if we are running on a 32-bit JVM. Since the majority of modern
     * systems are 64 bits, this method "assumes" 64 bits and only returns true
     * if sun.arch.data.model explicitly indicates a 32-bit JVM.
     *
     * @return true if we can determine definitively that this is a 32-bit JVM,
     *         otherwise false
     */
    private static boolean is32BitJvm() {
        Integer bits = Integer.getInteger("sun.arch.data.model");
        return bits != null && bits == 32;
    }
}

Related

  1. is32bitJVM()
  2. is32bitJVM()