Package org.openjdk.jmc.common.util
Class Environment
java.lang.Object
org.openjdk.jmc.common.util.Environment
Class that returns information about the OS and other things related to the local environment
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic String
static double
static Environment.OSType
static int
static boolean
isDebug()
Tell if this Mission Control instance is in debug mode, i.e.
-
Constructor Details
-
Environment
public Environment()
-
-
Method Details
-
isDebug
public static boolean isDebug()Tell if this Mission Control instance is in debug mode, i.e. was started up with the debug flag-Dmcdebug=true
.- Returns:
true
if in debug mode
-
getFullOSName
- Returns:
- the full OS name found from the system property "os.name"
-
getOSType
- Returns:
- the OS type
-
getNormalDPI
public static double getNormalDPI()- Returns:
- the "normal" 100% scaled DPI setting of the OS, 96 for Windows/Linux and 72 for MacOS.
-
getThisPID
public static int getThisPID()- Returns:
- the PID of this JVM, or 0 if no PID could be determined
-