Class Utils.SystemUtils

java.lang.Object
net.risingworld.api.utils.Utils.SystemUtils
Enclosing class:
Utils

public abstract static class Utils.SystemUtils extends Object
Various system functions providing access to information about the underlying hardware and operating system.
  • Constructor Details

    • SystemUtils

      public SystemUtils()
  • Method Details

    • getOperatingSystem

      public static String getOperatingSystem()
      Gets the name of the operating system.
      Returns:
      the name of the operating system.
    • getProcessorCores

      public static int getProcessorCores()
      Gets the number of processors or cores available to the JVM.
      Returns:
      the number of processors/cores.
    • getMemory

      public static int getMemory()
      Gets the maximum amount of heap memory the JVM can use.
      Returns:
      the heap memory, measured in megabytes.
    • getArchitecture

      public static String getArchitecture()
      Gets the architecture of the JVM (32 or 64 bit). Remember: If the server uses a 64 bit operating system, it is required to use the 64 bit version of Java.
      Returns:
      the architecture of the JVM.
    • getJavaVersion

      public static String getJavaVersion()
      Gets the Java version.
      Returns:
      the Java version.