Java JVM is 64 Bit is64bitJVM()

Here you can find the source of is64bitJVM()

Description

isbit JVM

License

Open Source License

Return

true if 64-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 is64bitJVM() 

Method Source Code

//package com.java2s;
/*//  w  w  w .ja v  a  2s. c o 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 64-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 is64bitJVM() {
        String os = System.getProperty("sun.arch.data.model");
        return os != null && os.equals("64");
    }
}

Related

  1. is64Bit()
  2. is64BitJavaOnMac()
  3. is64BitJavaOnMac()
  4. is64BitJre()
  5. is64BitJVM()
  6. is64BitJVM()