Class PlatformDependent


  • public final class PlatformDependent
    extends Object
    Utility class that can be used to detect properties specific to the current runtime environment, such as Java version and the availability of the sun.misc.Unsafe object.
    • Method Detail

      • javaVersion

        public static int javaVersion()
        Returns the Java version.
        Returns:
        the Java version
      • unsafeStaticFieldOffsetSupported

        public static boolean unsafeStaticFieldOffsetSupported()
        Returns true if access to Unsafe.staticFieldOffset(Field) is supported, false otherwise.
        Returns:
        true if access to Unsafe.staticFieldOffset(Field) is supported, false otherwise