Class Platform

  • public class Platform
    extends jogamp.common.os.PlatformPropsImpl
    Utility class for querying platform specific properties.

    Some field declarations and it's static initialization has been delegated to it's super class PlatformPropsImpl to solve static initialization interdependencies w/ the GlueGen native library loading and it's derived information getMachineDataInfo(), is32Bit(), ..
    This mechanism is preferred in this case to avoid synchronization and locking and allow better performance accessing the mentioned fields/methods.

    • Field Detail


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

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

      • isRunningFromJarURL

        public static final boolean isRunningFromJarURL()
        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.
      • 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.
      • 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

      • 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()
        Returns true if AWT is available and not in headless mode, otherwise false.
      • getCurrentSleepJitter

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

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