本文整理汇总了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 ;
}