Skip to content

Commit

Permalink
Merge 3e335fd into 30c85ad
Browse files Browse the repository at this point in the history
  • Loading branch information
Tomschi committed Feb 17, 2017
2 parents 30c85ad + 3e335fd commit 4320092
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions src/main/java/org/apache/commons/lang3/SystemUtils.java
Expand Up @@ -1480,6 +1480,43 @@ public class SystemUtils {
// os.version = 02.02.00
public static final boolean IS_OS_ZOS = getOSMatchesName("z/OS");

/**
* <p>
* Is {@code true} if the os.arch System Property matches the following {@link String}'s:
* <ul>
* <li>x8632</li>
* <li>x86</li>
* <li>i386 - i686</li>
* <li>ia32</li>
* <li>x32</li>
* </ul>
* </p>
* <p>
* Important: The os.arch System Property returns the architecture used by the JVM
* not of the operating system. E.g. a 32 bit JVM installed on a Windows 64 bit returns
* {@code true}.
* </p>
*/
public static final boolean IS_32_BIT_JVM = OS_ARCH.matches("^(x8632|x86|i[3-6]86|ia32|x32)$");

/**
* <p>
* Is {@code true} if the os.arch System Property matches the following {@link String}'s:
* <ul>
* <li>x8664</li>
* <li>amd64</li>
* <li>ia32e</li>
* <li>em64t</li>
* <li>x64</li>
* </ul>
* </p>
* <p>
* Important: The os.arch System Property returns the architecture used by the JVM
* not of the operating system.
* </p>
*/
public static boolean IS_64_BIT_JVM = OS_ARCH.matches("^(x8664|amd64|ia32e|em64t|x64)$");

/**
* <p>
* Gets the Java home directory as a {@code File}.
Expand Down

0 comments on commit 4320092

Please sign in to comment.