org.ehcache.impl.internal.classes.commonslang
Class SystemUtils

java.lang.Object
  extended by org.ehcache.impl.internal.classes.commonslang.SystemUtils

public class SystemUtils
extends java.lang.Object

Helpers for java.lang.System.

If a system property cannot be read due to security restrictions, the corresponding field in this class will be set to null and a message will be written to System.err.

#ThreadSafe#

Since:
1.0

Field Summary
static java.lang.String JAVA_SPECIFICATION_VERSION
           The java.specification.version System Property.
 
Constructor Summary
SystemUtils()
           SystemUtils instances should NOT be constructed in standard programming.
 
Method Summary
static boolean isJavaVersionAtLeast(JavaVersion requiredVersion)
           Is the Java version at least the requested version.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

JAVA_SPECIFICATION_VERSION

public static final java.lang.String JAVA_SPECIFICATION_VERSION

The java.specification.version System Property. Java Runtime Environment specification version.

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. If System.setProperty(String,String) or System.setProperties(java.util.Properties) is called after this class is loaded, the value will be out of sync with that System property.

Since:
Java 1.3
Constructor Detail

SystemUtils

public SystemUtils()

SystemUtils instances should NOT be constructed in standard programming. Instead, the class should be used as SystemUtils.FILE_SEPARATOR.

This constructor is public to permit tools that require a JavaBean instance to operate.

Method Detail

isJavaVersionAtLeast

public static boolean isJavaVersionAtLeast(JavaVersion requiredVersion)

Is the Java version at least the requested version.

Example input:

Parameters:
requiredVersion - the required version, for example 1.31f
Returns:
true if the actual version is equal or greater than the required version