Package net.risingworld.api.utils
Class Utils.SystemUtils
java.lang.Object
net.risingworld.api.utils.Utils.SystemUtils
- Enclosing class:
Utils
Various system functions providing access to information about the underlying
hardware and operating system.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
Gets the architecture of the JVM (32 or 64 bit).static String
Gets the Java version.static int
Gets the maximum amount of heap memory the JVM can use.static String
Gets the name of the operating system.static int
Gets the number of processors or cores available to the JVM.
-
Constructor Details
-
SystemUtils
public SystemUtils()
-
-
Method Details
-
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
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
Gets the Java version.- Returns:
- the Java version.
-