RuntimeOsUtilities¶
-
public final class
RuntimeOsUtilities¶ Utility class to retrieve OS and process information from a
java.lang.management.RuntimeMXBeaninstance. The dependency to this class is explicitly hidden via reflection to support Android devices, where the management package does not exist.- Author
jwienke
Methods¶
determineArguments¶
-
public List<String>
determineArguments()¶ Returns the input arguments passed to the Java virtual machine which does not include the arguments to the main method. This method returns an empty list if there is no input argument to the Java virtual machine.
- Returns
list of arguments,
nullif no determinable on current system
determineHostName¶
-
public String
determineHostName()¶ Returns the host name of the computer the JVM designated by the
java.lang.management.RuntimeMXBeanlives on.- Throws
IllegalArgumentException – in case the host name could not be parsed from the runtime environment
- Returns
host name,
nullif no determinable on current system