Class Platform

java.lang.Object
org.jruby.platform.Platform

public abstract class Platform extends Object
Platform specific constants.
  • Field Details

    • ARCH

      public static final String ARCH
    • OS

      public static final String OS
    • JVM

      public static final String JVM
    • OS_VERSION

      public static final String OS_VERSION
    • JAVA_VERSION

      public static final int JAVA_VERSION
      An integer value representing the major Java/JDK release, e.g. 8 for java 1.8, 9 for java 9.
    • IS_WINDOWS

      public static final boolean IS_WINDOWS
    • IS_MAC

      public static final boolean IS_MAC
    • IS_FREEBSD

      public static final boolean IS_FREEBSD
    • IS_DRAGONFLYBSD

      public static final boolean IS_DRAGONFLYBSD
    • IS_OPENBSD

      public static final boolean IS_OPENBSD
    • IS_LINUX

      public static final boolean IS_LINUX
    • IS_WSL

      public static final boolean IS_WSL
    • IS_SOLARIS

      public static final boolean IS_SOLARIS
    • IS_BSD

      public static final boolean IS_BSD
    • IS_OPENVMS

      public static final boolean IS_OPENVMS
    • NAME

      public static final String NAME
    • BIG_ENDIAN

      public static final int BIG_ENDIAN
      See Also:
    • LITTLE_ENDIAN

      public static final int LITTLE_ENDIAN
      See Also:
    • BYTE_ORDER

      public static final int BYTE_ORDER
    • BIT_WIDTH

      public static final int BIT_WIDTH
    • IS_GCJ

      public static final boolean IS_GCJ
    • IS_J9

      public static final boolean IS_J9
    • IS_IBM

      public static final boolean IS_IBM
  • Method Details

    • getPackageName

      public String getPackageName()
    • getOSPackageName

      public String getOSPackageName()
    • 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.