Java org.apache.commons.lang SystemUtils fields, constructors, methods, implement or subclass

Example usage for Java org.apache.commons.lang SystemUtils fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for org.apache.commons.lang SystemUtils.

The text is from its open source code.

Subclass

org.apache.commons.lang.SystemUtils has subclasses.
Click this link to see all its subclasses.

Field

StringFILE_ENCODING

The file.encoding System Property.

File encoding, such as Cp1252.

Defaults to null if the runtime does not have security access to read this property or the property does not exist.

This value is initialized when the class is loaded.

StringFILE_SEPARATOR

The file.separator System Property.

StringJAVA_CLASS_PATH

The java.class.path System Property.

StringJAVA_EXT_DIRS

The java.ext.dirs System Property.

StringJAVA_HOME

The java.home System Property.

StringJAVA_IO_TMPDIR

The java.io.tmpdir System Property.

StringJAVA_LIBRARY_PATH

The java.library.path System Property.

StringJAVA_RUNTIME_NAME

The java.runtime.name System Property.

StringJAVA_RUNTIME_VERSION

The java.runtime.version System Property.

StringJAVA_VENDOR

The java.vendor System Property.

StringJAVA_VENDOR_URL

The java.vendor.url System Property.

StringJAVA_VERSION

The java.version System Property.

StringJAVA_VM_INFO

The java.vm.info System Property.

StringJAVA_VM_NAME

The java.vm.name System Property.

StringJAVA_VM_VENDOR

The java.vm.vendor System Property.

StringLINE_SEPARATOR

The line.separator System Property.

StringOS_ARCH

The os.arch System Property.

StringOS_NAME

The os.name System Property.

StringOS_VERSION

The os.version System Property.

StringPATH_SEPARATOR

The path.separator System Property.

StringUSER_DIR

The user.dir System Property.

StringUSER_HOME

The user.home System Property.

StringUSER_LANGUAGE

The user.language System Property.

StringUSER_NAME

The user.name System Property.

StringUSER_TIMEZONE

The user.timezone System Property.

StringJAVA_VERSION_TRIMMED

Gets the Java version as a String trimming leading letters.

The field will return null if #JAVA_VERSION is null.

floatJAVA_VERSION_FLOAT

Gets the Java version as a float.

Example return values:

  • 1.2f for JDK 1.2
  • 1.31f for JDK 1.3.1

The field will return zero if #JAVA_VERSION is null.

intJAVA_VERSION_INT

Gets the Java version as an int.

Example return values:

  • 120 for JDK 1.2
  • 131 for JDK 1.3.1

The field will return zero if #JAVA_VERSION is null.

booleanIS_JAVA_1_3

Is true if this is Java version 1.3 (also 1.3.x versions).

The field will return false if #JAVA_VERSION is null.

booleanIS_JAVA_1_5

Is true if this is Java version 1.5 (also 1.5.x versions).

The field will return false if #JAVA_VERSION is null.

booleanIS_JAVA_1_6

Is true if this is Java version 1.6 (also 1.6.x versions).

The field will return false if #JAVA_VERSION is null.

booleanIS_OS_AIX

Is true if this is AIX.

The field will return false if OS_NAME is null.

booleanIS_OS_HP_UX

Is true if this is HP-UX.

The field will return false if OS_NAME is null.

booleanIS_OS_IRIX

Is true if this is Irix.

The field will return false if OS_NAME is null.

booleanIS_OS_LINUX

Is true if this is Linux.

The field will return false if OS_NAME is null.

booleanIS_OS_MAC

Is true if this is Mac.

The field will return false if OS_NAME is null.

booleanIS_OS_MAC_OSX

Is true if this is Mac.

The field will return false if OS_NAME is null.

booleanIS_OS_SOLARIS

Is true if this is Solaris.

The field will return false if OS_NAME is null.

booleanIS_OS_UNIX

Is true if this is a POSIX compilant system, as in any of AIX, HP-UX, Irix, Linux, MacOSX, Solaris or SUN OS.

The field will return false if OS_NAME is null.

booleanIS_OS_WINDOWS

Is true if this is Windows.

The field will return false if OS_NAME is null.

booleanIS_OS_WINDOWS_2000

Is true if this is Windows 2000.

The field will return false if OS_NAME is null.

booleanIS_OS_WINDOWS_95

Is true if this is Windows 95.

The field will return false if OS_NAME is null.

booleanIS_OS_WINDOWS_98

Is true if this is Windows 98.

The field will return false if OS_NAME is null.

booleanIS_OS_WINDOWS_ME

Is true if this is Windows ME.

The field will return false if OS_NAME is null.

booleanIS_OS_WINDOWS_NT

Is true if this is Windows NT.

The field will return false if OS_NAME is null.

booleanIS_OS_WINDOWS_XP

Is true if this is Windows XP.

The field will return false if OS_NAME is null.

Method

FilegetJavaHome()

Gets the Java home directory as a File.

FilegetJavaIoTmpDir()

Gets the Java IO temporary directory as a File.

FilegetUserDir()

Gets the user directory as a File.

FilegetUserHome()

Gets the user home directory as a File.

booleanisJavaAwtHeadless()
Returns whether the #JAVA_AWT_HEADLESS value is true.
booleanisJavaVersionAtLeast(float requiredVersion)

Is the Java version at least the requested version.

Example input:

  • 1.2f to test for JDK 1.2
  • 1.31f to test for JDK 1.3.1
booleanisJavaVersionAtLeast(int requiredVersion)

Is the Java version at least the requested version.

Example input:

  • 120 to test for JDK 1.2 or greater
  • 131 to test for JDK 1.3.1 or greater