|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjodd.util.SystemUtil
public class SystemUtil
Various system utilities.
| Field Summary | |
|---|---|
static java.lang.String |
FILE_ENCODING
|
static java.lang.String |
HTTP_PROXY_HOST
|
static java.lang.String |
HTTP_PROXY_PASSWORD
|
static java.lang.String |
HTTP_PROXY_PORT
|
static java.lang.String |
HTTP_PROXY_USER
|
static java.lang.String |
JAVA_CLASSPATH
|
static java.lang.String |
JAVA_HOME
|
static java.lang.String |
JAVA_SPECIFICATION_VERSION
|
static java.lang.String |
JAVA_VENDOR
|
static java.lang.String |
JAVA_VERSION
|
static java.lang.String |
OS_NAME
|
static java.lang.String |
OS_VERSION
|
static java.lang.String |
PATH_SEPARATOR
|
static java.lang.String |
SUN_BOOT_CLASS_PATH
|
static java.lang.String |
TEMP_DIR
|
static java.lang.String |
USER_DIR
|
static java.lang.String |
USER_HOME
|
static java.lang.String |
USER_NAME
|
| Constructor Summary | |
|---|---|
SystemUtil()
|
|
| Method Summary | |
|---|---|
static java.lang.String |
getClassPath()
Returns system class path. |
static java.lang.String |
getFileEncoding()
Returns file encoding. |
static java.lang.String |
getJavaHome()
Returns JAVA_HOME which is not equals to "java.home" property since it points to JAVA_HOME/jre folder. |
static java.lang.String |
getJavaJreHome()
Returns JRE home. |
static double |
getJavaSpecificationVersion()
Retrieves the version of the currently running JVM. |
static java.lang.String |
getJavaVendor()
Returns Java vendor. |
static java.lang.String |
getJavaVersion()
Returns Java version. |
static java.lang.String |
getOsName()
Returns OS name. |
static java.lang.String |
getOsVersion()
Returns OS version. |
static java.lang.String |
getPathSeparator()
Returns path separator. |
static java.lang.String |
getSunBoothClassPath()
Returns sun bootstrap class path. |
static java.lang.String |
getTempDir()
Returns system temp dir. |
static java.lang.String |
getUserDir()
Returns current working folder. |
static java.lang.String |
getUserHome()
Returns user home folder. |
static java.lang.String |
getUserName()
Returns current user. |
static java.lang.String |
getWorkingFolder()
Returns current working folder. |
static boolean |
isAtLeastJdk15()
Checks if the currently running JVM is at least compliant with JDK 1.5. |
static boolean |
isAtLeastJdk16()
Checks if the currently running JVM is at least compliant with JDK 1.6. |
static boolean |
isHostAix()
Returns true< if host is AIX. |
static boolean |
isHostLinux()
Returns true if host is Linux. |
static boolean |
isHostMac()
Returns true if host is Mac. |
static boolean |
isHostSolaris()
Returns true if host is Solaris. |
static boolean |
isHostUnix()
Returns true if host is a general unix. |
static boolean |
isHostWindows()
Returns true if host is Windows. |
static void |
setHttpProxy(java.lang.String host,
java.lang.String port)
Sets HTTP proxy settings. |
static void |
setHttpProxy(java.lang.String host,
java.lang.String port,
java.lang.String username,
java.lang.String password)
Sets HTTP proxy settings. |
static double |
systemTimerResolution()
Calculates and returns java system timer resolution in miliseconds. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String USER_DIR
public static final java.lang.String USER_NAME
public static final java.lang.String USER_HOME
public static final java.lang.String JAVA_HOME
public static final java.lang.String TEMP_DIR
public static final java.lang.String OS_NAME
public static final java.lang.String OS_VERSION
public static final java.lang.String JAVA_VERSION
public static final java.lang.String JAVA_SPECIFICATION_VERSION
public static final java.lang.String JAVA_VENDOR
public static final java.lang.String JAVA_CLASSPATH
public static final java.lang.String PATH_SEPARATOR
public static final java.lang.String HTTP_PROXY_HOST
public static final java.lang.String HTTP_PROXY_PORT
public static final java.lang.String HTTP_PROXY_USER
public static final java.lang.String HTTP_PROXY_PASSWORD
public static final java.lang.String FILE_ENCODING
public static final java.lang.String SUN_BOOT_CLASS_PATH
| Constructor Detail |
|---|
public SystemUtil()
| Method Detail |
|---|
public static double systemTimerResolution()
public static java.lang.String getUserDir()
public static java.lang.String getUserName()
public static java.lang.String getUserHome()
public static java.lang.String getWorkingFolder()
getUserDir().
public static java.lang.String getJavaJreHome()
public static java.lang.String getJavaHome()
public static java.lang.String getTempDir()
public static java.lang.String getOsName()
public static java.lang.String getOsVersion()
public static java.lang.String getJavaVersion()
getJavaSpecificationVersion()public static double getJavaSpecificationVersion()
public static java.lang.String getJavaVendor()
public static java.lang.String getClassPath()
public static java.lang.String getPathSeparator()
public static java.lang.String getFileEncoding()
public static boolean isAtLeastJdk15()
public static boolean isAtLeastJdk16()
public static boolean isHostWindows()
true if host is Windows.
public static boolean isHostLinux()
true if host is Linux.
public static boolean isHostUnix()
true if host is a general unix.
public static boolean isHostMac()
true if host is Mac.
public static boolean isHostSolaris()
true if host is Solaris.
public static boolean isHostAix()
true< if host is AIX.
public static java.lang.String getSunBoothClassPath()
public static void setHttpProxy(java.lang.String host,
java.lang.String port,
java.lang.String username,
java.lang.String password)
public static void setHttpProxy(java.lang.String host,
java.lang.String port)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||