Java JVM is 32 Bit is32bitJVM()

Here you can find the source of is32bitJVM()

Description

isbit JVM

License

Open Source License

Return

true if 32-bit JVM CAUTION: this does not seem to be particularly portable (the system property is specific to the Sun (now Oracle) JVM)

Declaration

public static boolean is32bitJVM() 

Method Source Code

//package com.java2s;
/*//from www. j a  v a  2 s .  co m
 * Copyright (c) 2012 Diamond Light Source Ltd.
 *
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 */

public class Main {
    /**
     * @return true if 32-bit JVM
     * CAUTION: this does not seem to be particularly portable (the system property is specific to the Sun (now Oracle) JVM)
     */
    public static boolean is32bitJVM() {
        String os = System.getProperty("sun.arch.data.model");
        return os != null && os.equals("32");
    }
}

Related

  1. is32bitJVM()
  2. is32BitJvm()