Package de.galan.commons.util
Class JvmUtil
java.lang.Object
de.galan.commons.util.JvmUtil
Provides access to information about the currently running JVM and some process-control.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder to terminate the JVM -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddShutdownHook(Runnable task) Null-safe shortcut to Runtime method, catching RuntimeExceptions.static Stringstatic StringgetPid()static longstatic JvmUtil.TerminateBuilder
-
Constructor Details
-
JvmUtil
public JvmUtil()
-
-
Method Details
-
getPid
-
getMachineName
-
getUptime
public static long getUptime() -
terminate
-
addShutdownHook
Null-safe shortcut to Runtime method, catching RuntimeExceptions.
-