Package com.sun.jna

# Class Platform

java.lang.Object
com.sun.jna.Platform

public final class Platform extends Object
Provide simplified platform information.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final int`
  `AIX`
  `static final int`
  `ANDROID`
  `static final String`
  `ARCH`
  Current platform architecture.
  `static final String`
  `C_LIBRARY_NAME`
  Canonical name of this platform's C runtime library.
  `static final int`
  `DRAGONFLYBSD`
  `static final int`
  `FREEBSD`
  `static final int`
  `GNU`
  `static final boolean`
  `HAS_AWT`
  Whether this platform provides the AWT Component class; also false if running headless.
  `static final boolean`
  `HAS_BUFFERS`
  Whether this platform provides NIO Buffers.
  `static final boolean`
  `HAS_DLL_CALLBACKS`
  Whether in-DLL callbacks are supported.
  `static final boolean`
  `HAS_JAWT`
  Whether this platform supports the JAWT library.
  `static final int`
  `KFREEBSD`
  `static final int`
  `LINUX`
  `static final int`
  `MAC`
  `static final String`
  `MATH_LIBRARY_NAME`
  Canonical name of this platform's math library.
  `static final int`
  `NETBSD`
  `static final int`
  `OPENBSD`
  `static final String`
  `RESOURCE_PREFIX`
  Canonical resource prefix for the current platform.
  `static final boolean`
  `RO_FIELDS`
  Whether read-only (final) fields within Structures are supported.
  `static final int`
  `SOLARIS`
  `static final int`
  `UNSPECIFIED`
  `static final int`
  `WINDOWS`
  `static final int`
  `WINDOWSCE`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `(package private) static String`
  `getCanonicalArchitecture(String arch, int platform)`
  `(package private) static String`
  `getNativeLibraryResourcePrefix()`
  Generate a canonical String prefix based on the current OS type/arch/name.
  `(package private) static String`
  `getNativeLibraryResourcePrefix(int osType, String arch, String name)`
  Generate a canonical String prefix based on the given OS type/arch/name.
  `static final int`
  `getOSType()`
  `static final boolean`
  `hasRuntimeExec()`
  `static final boolean`
  `is64Bit()`
  `static final boolean`
  `isAIX()`
  `static final boolean`
  `isAndroid()`
  `static final boolean`
  `isARM()`
  `static final boolean`
  `isDragonFlyBSD()`
  `static final boolean`
  `isFreeBSD()`
  `static final boolean`
  `isGNU()`
  `static final boolean`
  `isIntel()`
  `static final boolean`
  `iskFreeBSD()`
  `static final boolean`
  `isLinux()`
  `static final boolean`
  `isLoongArch()`
  `static final boolean`
  `isMac()`
  `static final boolean`
  `isMIPS()`
  `static final boolean`
  `isNetBSD()`
  `static final boolean`
  `isOpenBSD()`
  `static final boolean`
  `isPPC()`
  `(package private) static boolean`
  `isSoftFloat()`
  `static final boolean`
  `isSolaris()`
  `static final boolean`
  `isSPARC()`
  `static final boolean`
  `isWindows()`
  Returns true for any windows variant.
  `static final boolean`
  `isWindowsCE()`
  `static final boolean`
  `isX11()`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### UNSPECIFIED

    public static final int UNSPECIFIED
    See Also:
      - Constant Field Values

  - ### MAC

    public static final int MAC
    See Also:
      - Constant Field Values

  - ### LINUX

    public static final int LINUX
    See Also:
      - Constant Field Values

  - ### WINDOWS

    public static final int WINDOWS
    See Also:
      - Constant Field Values

  - ### SOLARIS

    public static final int SOLARIS
    See Also:
      - Constant Field Values

  - ### FREEBSD

    public static final int FREEBSD
    See Also:
      - Constant Field Values

  - ### OPENBSD

    public static final int OPENBSD
    See Also:
      - Constant Field Values

  - ### WINDOWSCE

    public static final int WINDOWSCE
    See Also:
      - Constant Field Values

  - ### AIX

    public static final int AIX
    See Also:
      - Constant Field Values

  - ### ANDROID

    public static final int ANDROID
    See Also:
      - Constant Field Values

  - ### GNU

    public static final int GNU
    See Also:
      - Constant Field Values

  - ### KFREEBSD

    public static final int KFREEBSD
    See Also:
      - Constant Field Values

  - ### NETBSD

    public static final int NETBSD
    See Also:
      - Constant Field Values

  - ### DRAGONFLYBSD

    public static final int DRAGONFLYBSD
    See Also:
      - Constant Field Values

  - ### RO_FIELDS

    public static final boolean RO_FIELDS
    Whether read-only (final) fields within Structures are supported.

  - ### HAS_BUFFERS

    public static final boolean HAS_BUFFERS
    Whether this platform provides NIO Buffers.

  - ### HAS_AWT

    public static final boolean HAS_AWT
    Whether this platform provides the AWT Component class; also false if running headless.

  - ### HAS_JAWT

    public static final boolean HAS_JAWT
    Whether this platform supports the JAWT library.

  - ### MATH_LIBRARY_NAME

    public static final String MATH_LIBRARY_NAME
    Canonical name of this platform's math library.

  - ### C_LIBRARY_NAME

    public static final String C_LIBRARY_NAME
    Canonical name of this platform's C runtime library.

  - ### HAS_DLL_CALLBACKS

    public static final boolean HAS_DLL_CALLBACKS
    Whether in-DLL callbacks are supported.

  - ### RESOURCE_PREFIX

    public static final String RESOURCE_PREFIX
    Canonical resource prefix for the current platform. This value is used to load bundled native libraries from the class path.

  - ### ARCH

    public static final String ARCH
    Current platform architecture.

- ## Method Details

  - ### getOSType

    public static final int getOSType()

  - ### isMac

    public static final boolean isMac()

  - ### isAndroid

    public static final boolean isAndroid()

  - ### isLinux

    public static final boolean isLinux()

  - ### isAIX

    public static final boolean isAIX()

  - ### isWindowsCE

    public static final boolean isWindowsCE()

  - ### isWindows

    public static final boolean isWindows()
    Returns true for any windows variant.

  - ### isSolaris

    public static final boolean isSolaris()

  - ### isDragonFlyBSD

    public static final boolean isDragonFlyBSD()

  - ### isFreeBSD

    public static final boolean isFreeBSD()

  - ### isOpenBSD

    public static final boolean isOpenBSD()

  - ### isNetBSD

    public static final boolean isNetBSD()

  - ### isGNU

    public static final boolean isGNU()

  - ### iskFreeBSD

    public static final boolean iskFreeBSD()

  - ### isX11

    public static final boolean isX11()

  - ### hasRuntimeExec

    public static final boolean hasRuntimeExec()

  - ### is64Bit

    public static final boolean is64Bit()

  - ### isIntel

    public static final boolean isIntel()

  - ### isPPC

    public static final boolean isPPC()

  - ### isARM

    public static final boolean isARM()

  - ### isSPARC

    public static final boolean isSPARC()

  - ### isMIPS

    public static final boolean isMIPS()

  - ### isLoongArch

    public static final boolean isLoongArch()

  - ### getCanonicalArchitecture

    static String getCanonicalArchitecture(String arch, int platform)

  - ### isSoftFloat

    static boolean isSoftFloat()

  - ### getNativeLibraryResourcePrefix

    static String getNativeLibraryResourcePrefix()
    Generate a canonical String prefix based on the current OS type/arch/name.

  - ### getNativeLibraryResourcePrefix

    static String getNativeLibraryResourcePrefix(int osType, String arch, String name)
    Generate a canonical String prefix based on the given OS type/arch/name.
    Parameters:
      `osType` - from `getOSType()`
      `arch` - from `os.arch` System property
      `name` - from `os.name` System property