2362N/A * Copyright (c) 2003, 2008, Oracle and/or its affiliates. All rights reserved. 0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A * This code is free software; you can redistribute it and/or modify it 0N/A * under the terms of the GNU General Public License version 2 only, as 2362N/A * published by the Free Software Foundation. Oracle designates this 0N/A * particular file as subject to the "Classpath" exception as provided 2362N/A * by Oracle in the LICENSE file that accompanied this code. 0N/A * This code is distributed in the hope that it will be useful, but WITHOUT 0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A * version 2 for more details (a copy is included in the LICENSE file that 0N/A * accompanied this code). 0N/A * You should have received a copy of the GNU General Public License version 0N/A * 2 along with this work; if not, write to the Free Software Foundation, 0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 2362N/A * or visit www.oracle.com if you need additional information or have any 0N/A * The management interface for the runtime system of 0N/A * the Java virtual machine. 0N/A * <p> A Java virtual machine has a single instance of the implementation 0N/A * class of this interface. This instance implementing this interface is 0N/A * that can be obtained by calling 0N/A * the {@link ManagementFactory#getRuntimeMXBean} method or 0N/A * from the {@link ManagementFactory#getPlatformMBeanServer 0N/A * platform <tt>MBeanServer</tt>} method. 0N/A * <p>The <tt>ObjectName</tt> for uniquely identifying the MXBean for 0N/A * the runtime system within an MBeanServer is: 0N/A * {@link ManagementFactory#RUNTIME_MXBEAN_NAME 0N/A * <tt>java.lang:type=Runtime</tt>} 178N/A * It can be obtained by calling the 178N/A * {@link PlatformManagedObject#getObjectName} method. 0N/A * <p> This interface defines several convenient methods for accessing 0N/A * system properties about the Java virtual machine. 178N/A * @see ManagementFactory#getPlatformMXBeans(Class) 0N/A * JMX Specification.</a> 0N/A * Ways to Access MXBeans</a> 0N/A * @author Mandy Chung 0N/A * Returns the name representing the running Java virtual machine. 0N/A * The returned name string can be any arbitrary string and 0N/A * a Java virtual machine implementation can choose 0N/A * to embed platform-specific useful information in the 0N/A * returned name string. Each running virtual machine could have 0N/A * @return the name representing the running Java virtual machine. 0N/A * Returns the Java virtual machine implementation name. 0N/A * This method is equivalent to {@link System#getProperty 0N/A * System.getProperty("java.vm.name")}. 0N/A * @return the Java virtual machine implementation name. 0N/A * @throws java.lang.SecurityException 0N/A * if a security manager exists and its 0N/A * <code>checkPropertiesAccess</code> method doesn't allow access 0N/A * to this system property. 0N/A * @see java.lang.SecurityManager#checkPropertyAccess(java.lang.String) 0N/A * @see java.lang.System#getProperty 0N/A * Returns the Java virtual machine implementation vendor. 0N/A * This method is equivalent to {@link System#getProperty 0N/A * System.getProperty("java.vm.vendor")}. 0N/A * @return the Java virtual machine implementation vendor. 0N/A * @throws java.lang.SecurityException 0N/A * if a security manager exists and its 0N/A * <code>checkPropertiesAccess</code> method doesn't allow access 0N/A * to this system property. 0N/A * @see java.lang.SecurityManager#checkPropertyAccess(java.lang.String) 0N/A * @see java.lang.System#getProperty 0N/A * Returns the Java virtual machine implementation version. 0N/A * This method is equivalent to {@link System#getProperty 0N/A * System.getProperty("java.vm.version")}. 0N/A * @return the Java virtual machine implementation version. 0N/A * @throws java.lang.SecurityException 0N/A * if a security manager exists and its 0N/A * <code>checkPropertiesAccess</code> method doesn't allow access 0N/A * to this system property. 0N/A * @see java.lang.SecurityManager#checkPropertyAccess(java.lang.String) 0N/A * @see java.lang.System#getProperty 0N/A * Returns the Java virtual machine specification name. 0N/A * This method is equivalent to {@link System#getProperty 0N/A * System.getProperty("java.vm.specification.name")}. 0N/A * @return the Java virtual machine specification name. 0N/A * @throws java.lang.SecurityException 0N/A * if a security manager exists and its 0N/A * <code>checkPropertiesAccess</code> method doesn't allow access 0N/A * to this system property. 0N/A * @see java.lang.SecurityManager#checkPropertyAccess(java.lang.String) 0N/A * @see java.lang.System#getProperty 0N/A * Returns the Java virtual machine specification vendor. 0N/A * This method is equivalent to {@link System#getProperty 0N/A * System.getProperty("java.vm.specification.vendor")}. 0N/A * @return the Java virtual machine specification vendor. 0N/A * @throws java.lang.SecurityException 0N/A * if a security manager exists and its 0N/A * <code>checkPropertiesAccess</code> method doesn't allow access 0N/A * to this system property. 0N/A * @see java.lang.SecurityManager#checkPropertyAccess(java.lang.String) 0N/A * @see java.lang.System#getProperty 0N/A * Returns the Java virtual machine specification version. 0N/A * This method is equivalent to {@link System#getProperty 0N/A * System.getProperty("java.vm.specification.version")}. 0N/A * @return the Java virtual machine specification version. 0N/A * @throws java.lang.SecurityException 0N/A * if a security manager exists and its 0N/A * <code>checkPropertiesAccess</code> method doesn't allow access 0N/A * to this system property. 0N/A * @see java.lang.SecurityManager#checkPropertyAccess(java.lang.String) 0N/A * @see java.lang.System#getProperty 0N/A * Returns the version of the specification for the management interface 0N/A * implemented by the running Java virtual machine. 0N/A * @return the version of the specification for the management interface 0N/A * implemented by the running Java virtual machine. 0N/A * Returns the Java class path that is used by the system class loader 0N/A * to search for class files. 0N/A * This method is equivalent to {@link System#getProperty 0N/A * System.getProperty("java.class.path")}. 0N/A * <p> Multiple paths in the Java class path are separated by the 0N/A * path separator character of the platform of the Java virtual machine 0N/A * @return the Java class path. 0N/A * @throws java.lang.SecurityException 0N/A * if a security manager exists and its 0N/A * <code>checkPropertiesAccess</code> method doesn't allow access 0N/A * to this system property. 0N/A * @see java.lang.SecurityManager#checkPropertyAccess(java.lang.String) 0N/A * @see java.lang.System#getProperty 0N/A * Returns the Java library path. 0N/A * This method is equivalent to {@link System#getProperty 0N/A * System.getProperty("java.library.path")}. 0N/A * <p> Multiple paths in the Java library path are separated by the 0N/A * path separator character of the platform of the Java virtual machine 0N/A * @return the Java library path. 0N/A * @throws java.lang.SecurityException 0N/A * if a security manager exists and its 0N/A * <code>checkPropertiesAccess</code> method doesn't allow access 0N/A * to this system property. 0N/A * @see java.lang.SecurityManager#checkPropertyAccess(java.lang.String) 0N/A * @see java.lang.System#getProperty 0N/A * Tests if the Java virtual machine supports the boot class path 0N/A * mechanism used by the bootstrap class loader to search for class 0N/A * @return <tt>true</tt> if the Java virtual machine supports the 0N/A * class path mechanism; <tt>false</tt> otherwise. 0N/A * Returns the boot class path that is used by the bootstrap class loader 0N/A * to search for class files. 0N/A * <p> Multiple paths in the boot class path are separated by the 0N/A * path separator character of the platform on which the Java 0N/A * virtual machine is running. 0N/A * <p>A Java virtual machine implementation may not support 0N/A * the boot class path mechanism for the bootstrap class loader 0N/A * to search for class files. 0N/A * The {@link #isBootClassPathSupported} method can be used 0N/A * to determine if the Java virtual machine supports this method. 0N/A * @return the boot class path. 0N/A * @throws java.lang.UnsupportedOperationException 0N/A * if the Java virtual machine does not support this operation. 0N/A * @throws java.lang.SecurityException 0N/A * if a security manager exists and the caller does not have 0N/A * ManagementPermission("monitor"). 0N/A * Returns the input arguments passed to the Java virtual machine 0N/A * which does not include the arguments to the <tt>main</tt> method. 0N/A * This method returns an empty list if there is no input argument 0N/A * to the Java virtual machine. 0N/A * Some Java virtual machine implementations may take input arguments 0N/A * from multiple different sources: for examples, arguments passed from 0N/A * the application that launches the Java virtual machine such as 0N/A * the 'java' command, environment variables, configuration files, etc. 0N/A * Typically, not all command-line options to the 'java' command 0N/A * are passed to the Java virtual machine. 0N/A * Thus, the returned input arguments may not 0N/A * include all command-line options. 0N/A * <b>MBeanServer access</b>:<br> 0N/A * The mapped type of <tt>List<String></tt> is <tt>String[]</tt>. 0N/A * @return a list of <tt>String</tt> objects; each element 0N/A * is an argument passed to the Java virtual machine. 0N/A * @throws java.lang.SecurityException 0N/A * if a security manager exists and the caller does not have 0N/A * ManagementPermission("monitor"). 0N/A * Returns the uptime of the Java virtual machine in milliseconds. 0N/A * @return uptime of the Java virtual machine in milliseconds. 0N/A * Returns the start time of the Java virtual machine in milliseconds. 0N/A * This method returns the approximate time when the Java virtual 0N/A * @return start time of the Java virtual machine in milliseconds. 0N/A * Returns a map of names and values of all system properties. 0N/A * This method calls {@link System#getProperties} to get all 0N/A * system properties. Properties whose name or value is not 0N/A * a <tt>String</tt> are omitted. 0N/A * <b>MBeanServer access</b>:<br> 0N/A * The mapped type of <tt>Map<String,String></tt> is 0N/A * {@link javax.management.openmbean.TabularData TabularData} 0N/A * with two items in each row as follows: 0N/A * <th>Item Name</th> 0N/A * <th>Item Type</th> 0N/A * <td><tt>key</tt></td> 0N/A * <td><tt>String</tt></td> 0N/A * <td><tt>value</tt></td> 0N/A * <td><tt>String</tt></td> 0N/A * @return a map of names and values of all system properties. 0N/A * @throws java.lang.SecurityException 0N/A * if a security manager exists and its 0N/A * <code>checkPropertiesAccess</code> method doesn't allow access 0N/A * to the system properties.