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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringGets the architecture of the JVM (32 or 64 bit).static StringGets the Java version.static intGets the maximum amount of heap memory the JVM can use.static StringGets the name of the operating system.static intGets 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.
-