Class Platform
- java.lang.Object
-
- jogamp.common.os.PlatformPropsImpl
-
- com.jogamp.common.os.Platform
-
public class Platform extends jogamp.common.os.PlatformPropsImplUtility class for querying platform specific properties.Some field declarations and it's static initialization has been delegated to it's super class
PlatformPropsImplto solve static initialization interdependencies w/ the GlueGen native library loading and it's derived informationgetMachineDataInfo(),is32Bit(), ..
This mechanism is preferred in this case to avoid synchronization and locking and allow better performance accessing the mentioned fields/methods.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classPlatform.ABITypestatic classPlatform.CPUFamilystatic classPlatform.CPUTypestatic classPlatform.OSType
-
Field Summary
Fields Modifier and Type Field Description static booleanAWT_AVAILABLEtrueif AWT is available and not in headless mode, otherwisefalse.static booleanUSE_TEMP_JAR_CACHESystem property: 'jogamp.gluegen.UseTempJarCache', defaults to true ifPlatformPropsImpl.OS_TYPEis notPlatform.OSType.ANDROID.-
Fields inherited from class jogamp.common.os.PlatformPropsImpl
ABI_TYPE, ARCH, ARCH_lower, CPU_ARCH, JAVA_17, JAVA_21, JAVA_6, JAVA_9, JAVA_RUNTIME_NAME, JAVA_SE, JAVA_VENDOR, JAVA_VENDOR_URL, JAVA_VERSION, JAVA_VERSION_NUMBER, JAVA_VERSION_UPDATE, JAVA_VM_NAME, LITTLE_ENDIAN, NEWLINE, OS, os_and_arch, OS_lower, OS_TYPE, OS_VERSION, OS_VERSION_NUMBER, useDynamicLibraries
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static longcurrentMillis()Returns current monotonic milliseconds since start of this application.static longcurrentTimeMillis()Returns the unix based current monotonic time in milliseconds.static Platform.ABITypegetABIType()Returns the ABI type.static StringgetArchName()Returns the CPU architecture String.static Platform.CPUFamilygetCPUFamily()Returns the CPU family.static Platform.CPUTypegetCPUType()Returns the CPU architecture type.static longgetCurrentSleepJitter()Returns the estimated sleep jitter value in nanoseconds.static StringgetJavaRuntimeName()Returns the JAVA runtime name.static StringgetJavaVendor()Returns the JAVA vendor.static StringgetJavaVendorURL()Returns the JAVA vendor url.static StringgetJavaVersion()Returns the JAVA version.static VersionNumbergetJavaVersionNumber()Returns the JAVA version number.static StringgetJavaVMName()Returns the JAVA VM name.static MachineDataInfogetMachineDataInfo()Returns the MachineDataInfo of the running machine.static StringgetNewline()Returns the platform's line separator.static StringgetOSAndArch()Returns the GlueGen common name for the currently running OSType and CPUType as implemented in the build system in 'gluegen-cpptasks-base.xml'.static StringgetOSName()Returns the OS name.static Platform.OSTypegetOSType()Returns the OS type.static StringgetOSVersion()Returns the OS version.static VersionNumbergetOSVersionNumber()Returns the OS version number.static voidinitSingleton()kick off static initialization of platform property information and native gluegen_rt lib loadingstatic booleanis32Bit()Returns true if this JVM/ARCH is 32bit.static booleanis64Bit()Returns true if this JVM/ARCH is 64bit.static booleanisAWTAvailable()Returnstrueif AWT is available and not in headless mode, otherwisefalse.static booleanisLittleEndian()Returns true if this machine is little endian, otherwise false.static booleanisRunningFromJarURL()
-
-
-
Field Detail
-
USE_TEMP_JAR_CACHE
public static final boolean USE_TEMP_JAR_CACHE
System property: 'jogamp.gluegen.UseTempJarCache', defaults to true ifPlatformPropsImpl.OS_TYPEis notPlatform.OSType.ANDROID.
-
AWT_AVAILABLE
public static final boolean AWT_AVAILABLE
trueif AWT is available and not in headless mode, otherwisefalse.
-
-
Method Detail
-
isRunningFromJarURL
public static final boolean isRunningFromJarURL()
- Returns:
- true if we're running from a Jar URL, otherwise false
-
initSingleton
public static void initSingleton()
kick off static initialization of platform property information and native gluegen_rt lib loading
-
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, seegetOSType(), 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.ANDROIDtheOS name, is Linux
-
getCPUFamily
public static Platform.CPUFamily getCPUFamily()
Returns the CPU family.
-
getCPUType
public static Platform.CPUType getCPUType()
Returns the CPU architecture type.
-
is32Bit
public static boolean is32Bit()
Returns true if this JVM/ARCH is 32bit.Shortcut to
getCPUType().is32Bit
-
is64Bit
public static boolean is64Bit()
Returns true if this JVM/ARCH is 64bit.Shortcut to !
getCPUType().is32Bit
-
getABIType
public static Platform.ABIType getABIType()
Returns the ABI type.In case of
Platform.CPUFamily.ARM, the value is determined by parsing the Elf Headers of the running VM.Otherwise the value is
Platform.ABIType.GENERIC_ABI.
-
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)
-
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 platform's line separator.
-
getMachineDataInfo
public static MachineDataInfo getMachineDataInfo()
Returns the MachineDataInfo of the running machine.
-
isAWTAvailable
public static boolean isAWTAvailable()
Returnstrueif AWT is available and not in headless mode, otherwisefalse.
-
currentMillis
public static long currentMillis()
Returns current monotonic milliseconds since start of this application.Monotonic time shall be used for high-performance measurements of durations, since the underlying OS shall support fast calls.
- See Also:
Clock.currentMillis()
-
currentTimeMillis
public static long currentTimeMillis()
Returns the unix based current monotonic time in milliseconds.Monotonic time shall be used for high-performance measurements of durations, since the underlying OS shall support fast calls.
- See Also:
Clock.currentTimeMillis()
-
getCurrentSleepJitter
public static long getCurrentSleepJitter()
Returns the estimated sleep jitter value in nanoseconds.Includes a warm-up path, allowing hotspot to optimize the code.
-
-