本文整理匯總了Java中java.lang.management.RuntimeMXBean.isBootClassPathSupported方法的典型用法代碼示例。如果您正苦於以下問題:Java RuntimeMXBean.isBootClassPathSupported方法的具體用法?Java RuntimeMXBean.isBootClassPathSupported怎麽用?Java RuntimeMXBean.isBootClassPathSupported使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類java.lang.management.RuntimeMXBean
的用法示例。
在下文中一共展示了RuntimeMXBean.isBootClassPathSupported方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: doRuntimeMXBeanTest
import java.lang.management.RuntimeMXBean; //導入方法依賴的package包/類
private final int doRuntimeMXBeanTest(MBeanServerConnection mbsc) {
int errorCount = 0 ;
System.out.println("---- RuntimeMXBean") ;
try {
ObjectName runtimeName =
new ObjectName(ManagementFactory.RUNTIME_MXBEAN_NAME) ;
MBeanInfo mbInfo = mbsc.getMBeanInfo(runtimeName);
errorCount += checkNonEmpty(mbInfo);
System.out.println("getMBeanInfo\t\t" + mbInfo);
RuntimeMXBean runtime = null;
runtime =
JMX.newMXBeanProxy(mbsc,
runtimeName,
RuntimeMXBean.class) ;
System.out.println("getClassPath\t\t"
+ runtime.getClassPath());
System.out.println("getInputArguments\t\t"
+ runtime.getInputArguments());
System.out.println("getLibraryPath\t\t"
+ runtime.getLibraryPath());
System.out.println("getManagementSpecVersion\t\t"
+ runtime.getManagementSpecVersion());
System.out.println("getName\t\t"
+ runtime.getName());
System.out.println("getSpecName\t\t"
+ runtime.getSpecName());
System.out.println("getSpecVendor\t\t"
+ runtime.getSpecVendor());
System.out.println("getSpecVersion\t\t"
+ runtime.getSpecVersion());
System.out.println("getStartTime\t\t"
+ runtime.getStartTime());
System.out.println("getSystemProperties\t\t"
+ runtime.getSystemProperties());
System.out.println("getUptime\t\t"
+ runtime.getUptime());
System.out.println("getVmName\t\t"
+ runtime.getVmName());
System.out.println("getVmVendor\t\t"
+ runtime.getVmVendor());
System.out.println("getVmVersion\t\t"
+ runtime.getVmVersion());
boolean supported = runtime.isBootClassPathSupported() ;
System.out.println("isBootClassPathSupported\t\t"
+ supported);
if ( supported ) {
System.out.println("getBootClassPath\t\t"
+ runtime.getBootClassPath());
}
System.out.println("---- OK\n") ;
} catch (Exception e) {
Utils.printThrowable(e, true) ;
errorCount++ ;
System.out.println("---- ERROR\n") ;
}
return errorCount ;
}