Class RuntimeDetector

java.lang.Object
edu.wpi.first.util.RuntimeDetector

public final class RuntimeDetector extends Object
A utility class for detecting and providing platform-specific such as OS and CPU architecture.
  • Method Details

    • getFilePrefix

      public static String getFilePrefix()
      Get the file prefix for the current system.
      Returns:
      The file prefix.
    • getFileExtension

      public static String getFileExtension()
      Get the file extension for the current system.
      Returns:
      The file extension.
    • getPlatformPath

      public static String getPlatformPath()
      Get the platform path for the current system.
      Returns:
      The platform path.
    • getLibraryResource

      public static String getLibraryResource(String libName)
      Get the path to the requested resource.
      Parameters:
      libName - Library name.
      Returns:
      The path to the requested resource.
    • getHashLibraryResource

      public static String getHashLibraryResource(String libName)
      Get the path to the hash to the requested resource.
      Parameters:
      libName - Library name.
      Returns:
      The path to the hash to the requested resource.
    • isAthena

      public static boolean isAthena()
      Check if hardware platform is Athena.
      Returns:
      True if hardware platform is Athena.
    • isArm32

      public static boolean isArm32()
      Check if OS is Arm32.
      Returns:
      True if OS is Arm32.
    • isArm64

      public static boolean isArm64()
      Check if architecture is Arm64.
      Returns:
      if architecture is Arm64.
    • isLinux

      public static boolean isLinux()
      Check if OS is Linux.
      Returns:
      if OS is Linux.
    • isWindows

      public static boolean isWindows()
      Check if OS is Windows.
      Returns:
      if OS is Windows.
    • isMac

      public static boolean isMac()
      Check if OS is Mac.
      Returns:
      if OS is Mac.
    • is32BitIntel

      public static boolean is32BitIntel()
      Check if OS is 32bit Intel.
      Returns:
      if OS is 32bit Intel.
    • is64BitIntel

      public static boolean is64BitIntel()
      Check if OS is 64bit Intel.
      Returns:
      if OS is 64bit Intel.