A Java virtual machine has a single instance of the implementation class of this interface. This instance implementing this interface is an MXBean that can be obtained by calling the ManagementFactory.getRuntimeMXBean() method or from the platform MBeanServer method.
The ObjectName for uniquely identifying the MXBean for the runtime system within an MBeanServer is:
java.lang:type=Runtime
This interface defines several convenient methods for accessing system properties about the Java virtual machine.
| Method Summary | ||
| getBootClassPath() Returns the boot class path that is used by the bootstrap class loader
to search for class files. |
||
| getClassPath() Returns the Java class path that is used by the system class loader
to search for class files. |
||
| getInputArguments() Returns the input arguments passed to the Java virtual machine
which does not include the arguments to the main method. |
||
| getLibraryPath() Returns the Java library path. |
||
| getManagementSpecVersion() Returns the version of the specification for the management interface
implemented by the running Java virtual machine. |
||
| getName() Returns the name representing the running Java virtual machine. |
||
| getSpecName() Returns the Java virtual machine specification name. |
||
| getSpecVendor() Returns the Java virtual machine specification vendor. |
||
| getSpecVersion() Returns the Java virtual machine specification version. |
||
long |
getStartTime() Returns the start time of the Java virtual machine in milliseconds. |
|
| getSystemProperties() Returns a map of names and values of all system properties. |
||
long |
getUptime() Returns the uptime of the Java virtual machine in milliseconds. |
|
| getVmName() Returns the Java virtual machine implementation name. |
||
| getVmVendor() Returns the Java virtual machine implementation vendor. |
||
| getVmVersion() Returns the Java virtual machine implementation version. |
||
boolean |
isBootClassPathSupported() Tests if the Java virtual machine supports the boot class path
mechanism used by the bootstrap class loader to search for class
files. |
|
checkPropertiesAccess method doesn't allow access
to this system property.checkPropertiesAccess method doesn't allow access
to this system property.checkPropertiesAccess method doesn't allow access
to this system property.checkPropertiesAccess method doesn't allow access
to this system property.checkPropertiesAccess method doesn't allow access
to this system property.checkPropertiesAccess method doesn't allow access
to this system property.Multiple paths in the Java class path are separated by the path separator character of the platform of the Java virtual machine being monitored.
checkPropertiesAccess method doesn't allow access
to this system property.Multiple paths in the Java library path are separated by the path separator character of the platform of the Java virtual machine being monitored.
checkPropertiesAccess method doesn't allow access
to this system property.Multiple paths in the boot class path are separated by the path separator character of the platform on which the Java virtual machine is running.
A Java virtual machine implementation may not support the boot class path mechanism for the bootstrap class loader to search for class files. The isBootClassPathSupported() method can be used to determine if the Java virtual machine supports this method.
Some Java virtual machine implementations may take input arguments from multiple different sources: for examples, arguments passed from the application that launches the Java virtual machine such as the 'java' command, environment variables, configuration files, etc.
Typically, not all command-line options to the 'java' command are passed to the Java virtual machine. Thus, the returned input arguments may not include all command-line options.
MBeanServer access:
The mapped type of List
MBeanServer access:
The mapped type of Map
Item Name Item Type key String value String
checkPropertiesAccess method doesn't allow access
to the system properties.