com.jogamp.common.os
Class Platform

java.lang.Object
  extended by com.jogamp.common.os.Platform

public class Platform
extends Object

Utility class for querying platform specific properties.

Author:
Michael Bien, Sven Gothel, et. al.

Nested Class Summary
static class Platform.ABIType
           
static class Platform.CPUFamily
           
static class Platform.CPUType
           
static class Platform.OSType
           
 
Field Summary
static Platform.ABIType ABI_TYPE
           
static String ARCH
           
static String ARCH_lower
           
static boolean AWT_AVAILABLE
          true if AWT is available and not in headless mode, otherwise false.
static Platform.CPUType CPU_ARCH
           
static String JAVA_RUNTIME_NAME
           
static boolean JAVA_SE
           
static String JAVA_VENDOR
           
static String JAVA_VENDOR_URL
           
static String JAVA_VERSION
           
static VersionNumber JAVA_VERSION_NUMBER
           
static String JAVA_VM_NAME
           
static boolean LITTLE_ENDIAN
           
static String NEWLINE
           
static String OS
           
static String OS_lower
           
static Platform.OSType OS_TYPE
           
static String OS_VERSION
           
static VersionNumber OS_VERSION_NUMBER
           
static boolean USE_TEMP_JAR_CACHE
          System property: 'jogamp.gluegen.UseTempJarCache', defaults to true if OS_TYPE is not Platform.OSType.ANDROID.
 
Method Summary
static String getArchName()
          Returns the CPU architecture String.
static Platform.CPUFamily getCPUFamily()
          Returns the CPU type.
static Platform.CPUType getCPUType()
          Returns the CPU architecture.
static long getCurrentSleepJitter()
          Returns the estimated sleep jitter value in nanoseconds.
static String getJavaRuntimeName()
          Returns the JAVA runtime name.
static String getJavaVendor()
          Returns the JAVA vendor.
static String getJavaVendorURL()
          Returns the JAVA vendor url.
static String getJavaVersion()
          Returns the JAVA version.
static VersionNumber getJavaVersionNumber()
          Returns the JAVA version number.
static String getJavaVMName()
          Returns the JAVA VM name.
static MachineDescription getMachineDescription()
          Returns the MachineDescription of the running machine.
static String getNewline()
          Returns the JAVA vendor.
static String getOSAndArch()
          Returns the GlueGen common name for the currently running OSType and CPUType as implemented in the build system in 'gluegen-cpptasks-base.xml'.
static String getOSAndArch(Platform.OSType osType, Platform.CPUType cpuType, Platform.ABIType abiType)
          Returns the GlueGen common name for the given OSType and CPUType as implemented in the build system in 'gluegen-cpptasks-base.xml'.
A list of currently supported os.and.arch strings: freebsd-i586 freebsd-amd64 hpux-hppa linux-amd64 linux-ia64 linux-i586 linux-armv7 android-armv7 macosx-universal solaris-sparc solaris-sparcv9 solaris-amd64 solaris-i586 windows-amd64 windows-i586
static String getOSName()
          Returns the OS name.
static Platform.OSType getOSType()
          Returns the OS type.
static String getOSVersion()
          Returns the OS version.
static VersionNumber getOSVersionNumber()
          Returns the OS version number.
static void initSingleton()
          kick off static initialization incl native gluegen-rt lib loading
static boolean is32Bit()
          Returns true if this JVM/ARCH is 32bit.
static boolean is64Bit()
          Returns true if this JVM/ARCH is 64bit.
static boolean isJavaSE()
          Returns true only if this program is running on the Java Standard Edition.
static boolean isLittleEndian()
          Returns true if this machine is little endian, otherwise false.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

USE_TEMP_JAR_CACHE

public static final boolean USE_TEMP_JAR_CACHE
System property: 'jogamp.gluegen.UseTempJarCache', defaults to true if OS_TYPE is not Platform.OSType.ANDROID.


AWT_AVAILABLE

public static final boolean AWT_AVAILABLE
true if AWT is available and not in headless mode, otherwise false.


JAVA_SE

public static final boolean JAVA_SE

LITTLE_ENDIAN

public static final boolean LITTLE_ENDIAN

OS

public static final String OS

OS_lower

public static final String OS_lower

OS_VERSION

public static final String OS_VERSION

OS_VERSION_NUMBER

public static final VersionNumber OS_VERSION_NUMBER

ARCH

public static final String ARCH

ARCH_lower

public static final String ARCH_lower

JAVA_VENDOR

public static final String JAVA_VENDOR

JAVA_VENDOR_URL

public static final String JAVA_VENDOR_URL

JAVA_VM_NAME

public static final String JAVA_VM_NAME

JAVA_RUNTIME_NAME

public static final String JAVA_RUNTIME_NAME

JAVA_VERSION

public static final String JAVA_VERSION

JAVA_VERSION_NUMBER

public static final VersionNumber JAVA_VERSION_NUMBER

NEWLINE

public static final String NEWLINE

OS_TYPE

public static final Platform.OSType OS_TYPE

CPU_ARCH

public static final Platform.CPUType CPU_ARCH

ABI_TYPE

public static final Platform.ABIType ABI_TYPE
Method Detail

initSingleton

public static void initSingleton()
kick off static initialization incl native gluegen-rt lib loading


isJavaSE

public static boolean isJavaSE()
Returns true only if this program is running on the Java Standard Edition.


isLittleEndian

public static boolean isLittleEndian()
Returns true if this machine is little endian, otherwise false.


getOSName

public static String getOSName()
Returns the OS name.

In case of Platform.OSType.ANDROID, see getOSType(), the OS name is Linux


getOSVersion

public static String getOSVersion()
Returns the OS version.


getOSVersionNumber

public static VersionNumber getOSVersionNumber()
Returns the OS version number.


getArchName

public static String getArchName()
Returns the CPU architecture String.


getOSType

public static Platform.OSType getOSType()
Returns the OS type.

In case of Platform.OSType.ANDROID the OS name, see getOSName(), is Linux


getCPUFamily

public static Platform.CPUFamily getCPUFamily()
Returns the CPU type.


getCPUType

public static Platform.CPUType getCPUType()
Returns the CPU architecture.


getOSAndArch

public static String getOSAndArch()
Returns the GlueGen common name for the currently running OSType and CPUType as implemented in the build system in 'gluegen-cpptasks-base.xml'.

See Also:
#getOSAndArch(OSType, CPUType)

getOSAndArch

public static String getOSAndArch(Platform.OSType osType,
                                  Platform.CPUType cpuType,
                                  Platform.ABIType abiType)
Returns the GlueGen common name for the given OSType and CPUType as implemented in the build system in 'gluegen-cpptasks-base.xml'.
A list of currently supported os.and.arch strings:

Returns:

getJavaVendor

public static String getJavaVendor()
Returns the JAVA vendor.


getJavaVMName

public static String getJavaVMName()
Returns the JAVA VM name.


getJavaRuntimeName

public static String getJavaRuntimeName()
Returns the JAVA runtime name.


getJavaVendorURL

public static String getJavaVendorURL()
Returns the JAVA vendor url.


getJavaVersion

public static String getJavaVersion()
Returns the JAVA version.


getJavaVersionNumber

public static VersionNumber getJavaVersionNumber()
Returns the JAVA version number.


getNewline

public static String getNewline()
Returns the JAVA vendor.


is32Bit

public static boolean is32Bit()
Returns true if this JVM/ARCH is 32bit.

Shortcut to getMachineDescription().is32Bit()


is64Bit

public static boolean is64Bit()
Returns true if this JVM/ARCH is 64bit.

Shortcut to getMachineDescription().is64Bit()


getMachineDescription

public static MachineDescription getMachineDescription()
Returns the MachineDescription of the running machine.


getCurrentSleepJitter

public static long getCurrentSleepJitter()
Returns the estimated sleep jitter value in nanoseconds.

Includes a warm-up path, allowing hotspot to optimize the code.