org.jruby.ext.posix.util

Class Platform

public class Platform extends Object

$Id: $
Field Summary
static StringARCH
static booleanIS_32_BIT
static booleanIS_64_BIT
static booleanIS_BSD
static booleanIS_FREEBSD
static booleanIS_LINUX
static booleanIS_MAC
static booleanIS_OPENBSD
static booleanIS_SOLARIS
static booleanIS_WINDOWS
static booleanIS_WINDOWS_20X
static booleanIS_WINDOWS_7
static booleanIS_WINDOWS_9X
static booleanIS_WINDOWS_NT
static booleanIS_WINDOWS_VISTA
static booleanIS_WINDOWS_XP
static StringOS_NAME
static Map<String,String>OS_NAMES
static StringOS_NAME_LC
Method Summary
static StringenvCommand()
static StringgetOSName()
static StringgetProperty(String property, String defValue)
An extension over System.getProperty method.

Field Detail

ARCH

public static final String ARCH

IS_32_BIT

public static final boolean IS_32_BIT

IS_64_BIT

public static final boolean IS_64_BIT

IS_BSD

public static final boolean IS_BSD

IS_FREEBSD

public static final boolean IS_FREEBSD

IS_LINUX

public static final boolean IS_LINUX

IS_MAC

public static final boolean IS_MAC

IS_OPENBSD

public static final boolean IS_OPENBSD

IS_SOLARIS

public static final boolean IS_SOLARIS

IS_WINDOWS

public static final boolean IS_WINDOWS

IS_WINDOWS_20X

public static final boolean IS_WINDOWS_20X

IS_WINDOWS_7

public static final boolean IS_WINDOWS_7

IS_WINDOWS_9X

public static final boolean IS_WINDOWS_9X

IS_WINDOWS_NT

public static final boolean IS_WINDOWS_NT

IS_WINDOWS_VISTA

public static final boolean IS_WINDOWS_VISTA

IS_WINDOWS_XP

public static final boolean IS_WINDOWS_XP

OS_NAME

public static final String OS_NAME

OS_NAMES

public static final Map<String,String> OS_NAMES

OS_NAME_LC

public static final String OS_NAME_LC

Method Detail

envCommand

public static final String envCommand()

getOSName

public static String getOSName()

getProperty

public static String getProperty(String property, String defValue)
An extension over System.getProperty method. Handles security restrictions, and returns the default value if the access to the property is restricted.

Parameters: property The system property name. defValue The default value.

Returns: The value of the system property, or the default value.