JAVA获取编译GC内存运行时环境参数信息[ManagementFactory研究,全部Bean方法调用示例]_fastjson 超67108864_洛书i的博客-程序员秘密

技术标签: 代码段  java  技巧  

ManagementFactory是JAVA提供用于监视和管理 Java 虚拟机以及 Java 虚拟机在其上运行的操作系统。它同时允许从本地和远程对正在运行的 Java 虚拟机进行监视和管理,提供JVM堆的使用情况,以及GC情况,线程信息。

用ManagementFactory写对JVM的监控是个不错的选择。

研究ManagementFactory的话,因为提供的Bean比较多,一个个看比较麻烦。

故而用反射获取所有bean,调用bean下的所有无参方法,将结果格式化成报文。这样就能比较全面的看到ManagementFactory提供的能力。然后根据报文,找自己需要的bean和方法,顺瓜摸藤。

依赖
 

    <dependency>
       <groupId>com.alibaba</groupId>
       <artifactId>fastjson</artifactId>
       <version>1.2.71</version>
    </dependency>

代码段如下

 public void invokeAllManagementFactory() throws Exception {
        Method[] methods = ManagementFactory.class.getMethods();
        //保存ManagementFactory下的所有的所有Bean
        List<PlatformManagedObject> list = new LinkedList<>();
        for (Method method : methods) {
            Class<?>[] types = method.getParameterTypes();
            int modifiers = method.getModifiers();
            //如果是静态方法 并且没有参数就直接调用
            if (Modifier.isStatic(modifiers) && types.length == 0) {

                Object invoke = method.invoke(null);
                //返回是list<PlatformManagedObject> 或者 PlatformManagedObject 的放入list
                if (invoke instanceof List) {
                    List l = (List) invoke;
                    l.forEach(i -> {
                        if (i instanceof PlatformManagedObject) {
                            list.add((PlatformManagedObject) i);
                        }
                    });
                } else if (invoke instanceof PlatformManagedObject) {
                    list.add((PlatformManagedObject) invoke);
                }


            }
        }
        Map<String, Map<String, Object>> map = new LinkedHashMap<>();

        for (PlatformManagedObject platformManagedObject : list) {
            //对list里的遍历 执行所有方法 并且以key=methodName value=返回值的行式放到map1里
            LinkedHashMap<String, Object> map1 = new LinkedHashMap<>();
            map.put(platformManagedObject.getObjectName().getCanonicalName(), map1);
            Method[] methods1 = platformManagedObject.getClass().getMethods();
            for (Method method : methods1) {
                Class<?>[] types = method.getParameterTypes();
                if (types.length == 0) {
                    try {
                        method.setAccessible(true);
                        Object invoke = method.invoke(platformManagedObject);
                        map1.put(method.getName(), invoke);
                    } catch (Exception e) {

                    }

                }
            }
        }
        //格式化输出 并且打印所有信息
        //包括 编译 GC 内存 运行时环境 参数信息
        String string = JSON.toJSONString(map, SerializerFeature.PrettyFormat);
        System.out.println(string);
    }

打印报文如下,可以直观得看到ManagementFactory的能力,然后看哪些是自己需要的用来写监控的,去调用相应的bean和方法

{
	"java.lang:type=Compilation":{
		"getName":"HotSpot 64-Bit Tiered Compilers",
		"getTotalCompilationTime":143,
		"getObjectName":{
			"canonicalKeyPropertyListString":"type=Compilation",
			"domain":"java.lang",
			"domainPattern":false,
			"keyPropertyList":{
				"type":"Compilation"
			},
			"keyPropertyListString":"type=Compilation",
			"pattern":false,
			"propertyListPattern":false,
			"propertyPattern":false,
			"propertyValuePattern":false
		},
		"isCompilationTimeMonitoringSupported":true,
		"toString":"[email protected]",
		"hashCode":2051450519,
		"getClass":"sun.management.CompilationImpl"
	},
	"java.lang:type=ClassLoading":{
		"getTotalLoadedClassCount":1392,
		"getLoadedClassCount":1392,
		"getUnloadedClassCount":0,
		"getObjectName":{
			"canonicalKeyPropertyListString":"type=ClassLoading",
			"domain":"java.lang",
			"domainPattern":false,
			"keyPropertyList":{
				"type":"ClassLoading"
			},
			"keyPropertyListString":"type=ClassLoading",
			"pattern":false,
			"propertyListPattern":false,
			"propertyPattern":false,
			"propertyValuePattern":false
		},
		"isVerbose":false,
		"toString":"[email protected]",
		"hashCode":1618212626,
		"getClass":"sun.management.ClassLoadingImpl"
	},
	"java.lang:type=Threading":{
		"getObjectName":{
			"canonicalKeyPropertyListString":"type=Threading",
			"domain":"java.lang",
			"domainPattern":false,
			"keyPropertyList":{
				"type":"Threading"
			},
			"keyPropertyListString":"type=Threading",
			"pattern":false,
			"propertyListPattern":false,
			"propertyPattern":false,
			"propertyValuePattern":false
		},
		"isThreadCpuTimeSupported":true,
		"isThreadAllocatedMemoryEnabled":true,
		"isThreadAllocatedMemorySupported":true,
		"getAllThreadIds":[6,5,4,3,2,1],
		"getCurrentThreadCpuTime":234375000,
		"getCurrentThreadUserTime":171875000,
		"getDaemonThreadCount":5,
		"getPeakThreadCount":6,
		"getThreadCount":6,
		"getTotalStartedThreadCount":6,
		"isCurrentThreadCpuTimeSupported":true,
		"isObjectMonitorUsageSupported":true,
		"isSynchronizerUsageSupported":true,
		"isThreadContentionMonitoringEnabled":false,
		"isThreadContentionMonitoringSupported":true,
		"isThreadCpuTimeEnabled":true,
		"toString":"[email protected]",
		"hashCode":1359044626,
		"getClass":"sun.management.ThreadImpl"
	},
	"java.lang:name=PS Scavenge,type=GarbageCollector":{
		"getObjectName":{
			"canonicalKeyPropertyListString":"name=PS Scavenge,type=GarbageCollector",
			"domain":"java.lang",
			"domainPattern":false,
			"keyPropertyList":{
				"name":"PS Scavenge",
				"type":"GarbageCollector"
			},
			"keyPropertyListString":"type=GarbageCollector,name=PS Scavenge",
			"pattern":false,
			"propertyListPattern":false,
			"propertyPattern":false,
			"propertyValuePattern":false
		},
		"getNotificationInfo":[{
			"description":"GC Notification",
			"name":"javax.management.Notification",
			"notifTypes":["com.sun.management.gc.notification"]
		}],
		"getCollectionCount":1,
		"getCollectionTime":1,
		"getLastGcInfo":{
			"compositeType":{
				"className":"javax.management.openmbean.CompositeData",
				"description":"CompositeType for GC info for PS Scavenge",
				"typeName":"sun.management.PS Scavenge.GcInfoCompositeType"
			},
			"duration":2,
			"endTime":194,
			"id":1,
			"memoryUsageAfterGc":{
				"Compressed Class Space":{
					"committed":1048576,
					"init":0,
					"max":1073741824,
					"used":929224
				},
				"PS Survivor Space":{
					"committed":11010048,
					"init":11010048,
					"max":11010048,
					"used":2170912
				},
				"PS Old Gen":{
					"committed":179306496,
					"init":179306496,
					"max":2852126720,
					"used":8192
				},
				"Metaspace":{
					"committed":8126464,
					"init":0,
					"max":-1,
					"used":7774552
				},
				"PS Eden Space":{
					"committed":67108864,
					"init":67108864,
					"max":1404043264,
					"used":0
				},
				"Code Cache":{
					"committed":2555904,
					"init":2555904,
					"max":251658240,
					"used":2337408
				}
			},
			"memoryUsageBeforeGc":{
				"Compressed Class Space":{
					"committed":1048576,
					"init":0,
					"max":1073741824,
					"used":929224
				},
				"PS Survivor Space":{
					"committed":11010048,
					"init":11010048,
					"max":11010048,
					"used":0
				},
				"PS Old Gen":{
					"committed":179306496,
					"init":179306496,
					"max":2852126720,
					"used":0
				},
				"Metaspace":{
					"committed":8126464,
					"init":0,
					"max":-1,
					"used":7774552
				},
				"PS Eden Space":{
					"committed":67108864,
					"init":67108864,
					"max":1404043264,
					"used":13427488
				},
				"Code Cache":{
					"committed":2555904,
					"init":2555904,
					"max":251658240,
					"used":2337408
				}
			},
			"startTime":192
		},
		"getName":"PS Scavenge",
		"isValid":true,
		"getMemoryPoolNames":["PS Eden Space","PS Survivor Space"],
		"toString":"[email protected]",
		"hashCode":2096057945,
		"getClass":"sun.management.GarbageCollectorImpl"
	},
	"java.lang:name=PS MarkSweep,type=GarbageCollector":{
		"getObjectName":{
			"canonicalKeyPropertyListString":"name=PS MarkSweep,type=GarbageCollector",
			"domain":"java.lang",
			"domainPattern":false,
			"keyPropertyList":{
				"name":"PS MarkSweep",
				"type":"GarbageCollector"
			},
			"keyPropertyListString":"type=GarbageCollector,name=PS MarkSweep",
			"pattern":false,
			"propertyListPattern":false,
			"propertyPattern":false,
			"propertyValuePattern":false
		},
		"getNotificationInfo":[{
			"description":"GC Notification",
			"name":"javax.management.Notification",
			"notifTypes":["com.sun.management.gc.notification"]
		}],
		"getCollectionCount":1,
		"getCollectionTime":7,
		"getLastGcInfo":{
			"compositeType":{
				"className":"javax.management.openmbean.CompositeData",
				"description":"CompositeType for GC info for PS MarkSweep",
				"typeName":"sun.management.PS MarkSweep.GcInfoCompositeType"
			},
			"duration":8,
			"endTime":202,
			"id":1,
			"memoryUsageAfterGc":{
				"Compressed Class Space":{
					"committed":1048576,
					"init":0,
					"max":1073741824,
					"used":929224
				},
				"PS Survivor Space":{
					"committed":11010048,
					"init":11010048,
					"max":11010048,
					"used":0
				},
				"PS Old Gen":{
					"committed":179306496,
					"init":179306496,
					"max":2852126720,
					"used":1979968
				},
				"Metaspace":{
					"committed":8126464,
					"init":0,
					"max":-1,
					"used":7774552
				},
				"PS Eden Space":{
					"committed":67108864,
					"init":67108864,
					"max":1404043264,
					"used":0
				},
				"Code Cache":{
					"committed":2555904,
					"init":2555904,
					"max":251658240,
					"used":2337408
				}
			},
			"memoryUsageBeforeGc":{
				"Compressed Class Space":{
					"committed":1048576,
					"init":0,
					"max":1073741824,
					"used":929224
				},
				"PS Survivor Space":{
					"committed":11010048,
					"init":11010048,
					"max":11010048,
					"used":2170912
				},
				"PS Old Gen":{
					"committed":179306496,
					"init":179306496,
					"max":2852126720,
					"used":8192
				},
				"Metaspace":{
					"committed":8126464,
					"init":0,
					"max":-1,
					"used":7774552
				},
				"PS Eden Space":{
					"committed":67108864,
					"init":67108864,
					"max":1404043264,
					"used":0
				},
				"Code Cache":{
					"committed":2555904,
					"init":2555904,
					"max":251658240,
					"used":2337408
				}
			},
			"startTime":194
		},
		"getName":"PS MarkSweep",
		"isValid":true,
		"getMemoryPoolNames":["PS Eden Space","PS Survivor Space","PS Old Gen"],
		"toString":"[email protected]",
		"hashCode":1689843956,
		"getClass":"sun.management.GarbageCollectorImpl"
	},
	"java.lang:type=Memory":{
		"getObjectName":{
			"canonicalKeyPropertyListString":"type=Memory",
			"domain":"java.lang",
			"domainPattern":false,
			"keyPropertyList":{
				"type":"Memory"
			},
			"keyPropertyListString":"type=Memory",
			"pattern":false,
			"propertyListPattern":false,
			"propertyPattern":false,
			"propertyValuePattern":false
		},
		"getNotificationInfo":[{
			"description":"Memory Notification",
			"name":"javax.management.Notification",
			"notifTypes":["java.management.memory.threshold.exceeded","java.management.memory.collection.threshold.exceeded"]
		}],
		"isVerbose":false,
		"getHeapMemoryUsage":{
			"committed":257425408,
			"init":268435456,
			"max":3803185152,
			"used":3322144
		},
		"getNonHeapMemoryUsage":{
			"committed":11730944,
			"init":2555904,
			"max":-1,
			"used":11054720
		},
		"getObjectPendingFinalizationCount":75,
		"toString":"[email protected]",
		"hashCode":2008017533,
		"getClass":"sun.management.MemoryImpl"
	},
	"java.lang:name=CodeCacheManager,type=MemoryManager":{
		"getName":"CodeCacheManager",
		"isValid":true,
		"getObjectName":{
			"canonicalKeyPropertyListString":"name=CodeCacheManager,type=MemoryManager",
			"domain":"java.lang",
			"domainPattern":false,
			"keyPropertyList":{
				"name":"CodeCacheManager",
				"type":"MemoryManager"
			},
			"keyPropertyListString":"type=MemoryManager,name=CodeCacheManager",
			"pattern":false,
			"propertyListPattern":false,
			"propertyPattern":false,
			"propertyValuePattern":false
		},
		"getNotificationInfo":[],
		"getMemoryPoolNames":["Code Cache"],
		"toString":"[email protected]",
		"hashCode":1020391880,
		"getClass":"sun.management.MemoryManagerImpl"
	},
	"java.lang:name=Metaspace Manager,type=MemoryManager":{
		"getName":"Metaspace Manager",
		"isValid":true,
		"getObjectName":{
			"canonicalKeyPropertyListString":"name=Metaspace Manager,type=MemoryManager",
			"domain":"java.lang",
			"domainPattern":false,
			"keyPropertyList":{
				"name":"Metaspace Manager",
				"type":"MemoryManager"
			},
			"keyPropertyListString":"type=MemoryManager,name=Metaspace Manager",
			"pattern":false,
			"propertyListPattern":false,
			"propertyPattern":false,
			"propertyValuePattern":false
		},
		"getNotificationInfo":[],
		"getMemoryPoolNames":["Metaspace","Compressed Class Space"],
		"toString":"[email protected]",
		"hashCode":977993101,
		"getClass":"sun.management.MemoryManagerImpl"
	},
	"java.lang:name=Code Cache,type=MemoryPool":{
		"getName":"Code Cache",
		"getType":"NON_HEAP",
		"isValid":true,
		"getObjectName":{
			"canonicalKeyPropertyListString":"name=Code Cache,type=MemoryPool",
			"domain":"java.lang",
			"domainPattern":false,
			"keyPropertyList":{
				"name":"Code Cache",
				"type":"MemoryPool"
			},
			"keyPropertyListString":"type=MemoryPool,name=Code Cache",
			"pattern":false,
			"propertyListPattern":false,
			"propertyPattern":false,
			"propertyValuePattern":false
		},
		"getMemoryManagerNames":["CodeCacheManager"],
		"getPeakUsage":{
			"committed":2555904,
			"init":2555904,
			"max":251658240,
			"used":2361024
		},
		"getUsage":{
			"committed":2555904,
			"init":2555904,
			"max":251658240,
			"used":2361024
		},
		"getUsageThreshold":0,
		"getUsageThresholdCount":0,
		"isCollectionUsageThresholdSupported":false,
		"isUsageThresholdExceeded":false,
		"isUsageThresholdSupported":true,
		"toString":"[email protected]",
		"hashCode":1830712962,
		"getClass":"sun.management.MemoryPoolImpl"
	},
	"java.lang:name=Metaspace,type=MemoryPool":{
		"getName":"Metaspace",
		"getType":"NON_HEAP",
		"isValid":true,
		"getObjectName":{
			"canonicalKeyPropertyListString":"name=Metaspace,type=MemoryPool",
			"domain":"java.lang",
			"domainPattern":false,
			"keyPropertyList":{
				"name":"Metaspace",
				"type":"MemoryPool"
			},
			"keyPropertyListString":"type=MemoryPool,name=Metaspace",
			"pattern":false,
			"propertyListPattern":false,
			"propertyPattern":false,
			"propertyValuePattern":false
		},
		"getMemoryManagerNames":["Metaspace Manager"],
		"getPeakUsage":{
			"committed":8126464,
			"init":0,
			"max":-1,
			"used":7837960
		},
		"getUsage":{
			"committed":8126464,
			"init":0,
			"max":-1,
			"used":7837960
		},
		"getUsageThreshold":0,
		"getUsageThresholdCount":0,
		"isCollectionUsageThresholdSupported":false,
		"isUsageThresholdExceeded":false,
		"isUsageThresholdSupported":true,
		"toString":"[email protected]",
		"hashCode":1112280004,
		"getClass":"sun.management.MemoryPoolImpl"
	},
	"java.lang:name=Compressed Class Space,type=MemoryPool":{
		"getName":"Compressed Class Space",
		"getType":"NON_HEAP",
		"isValid":true,
		"getObjectName":{
			"canonicalKeyPropertyListString":"name=Compressed Class Space,type=MemoryPool",
			"domain":"java.lang",
			"domainPattern":false,
			"keyPropertyList":{
				"name":"Compressed Class Space",
				"type":"MemoryPool"
			},
			"keyPropertyListString":"type=MemoryPool,name=Compressed Class Space",
			"pattern":false,
			"propertyListPattern":false,
			"propertyPattern":false,
			"propertyValuePattern":false
		},
		"getMemoryManagerNames":["Metaspace Manager"],
		"getPeakUsage":{
			"committed":1048576,
			"init":0,
			"max":1073741824,
			"used":937272
		},
		"getUsage":{
			"committed":1048576,
			"init":0,
			"max":1073741824,
			"used":937272
		},
		"getUsageThreshold":0,
		"getUsageThresholdCount":0,
		"isCollectionUsageThresholdSupported":false,
		"isUsageThresholdExceeded":false,
		"isUsageThresholdSupported":true,
		"toString":"[email protected]",
		"hashCode":1013423070,
		"getClass":"sun.management.MemoryPoolImpl"
	},
	"java.lang:name=PS Eden Space,type=MemoryPool":{
		"getName":"PS Eden Space",
		"getType":"HEAP",
		"isValid":true,
		"getObjectName":{
			"canonicalKeyPropertyListString":"name=PS Eden Space,type=MemoryPool",
			"domain":"java.lang",
			"domainPattern":false,
			"keyPropertyList":{
				"name":"PS Eden Space",
				"type":"MemoryPool"
			},
			"keyPropertyListString":"type=MemoryPool,name=PS Eden Space",
			"pattern":false,
			"propertyListPattern":false,
			"propertyPattern":false,
			"propertyValuePattern":false
		},
		"getCollectionUsage":{
			"committed":67108864,
			"init":67108864,
			"max":1404043264,
			"used":0
		},
		"getCollectionUsageThreshold":0,
		"getCollectionUsageThresholdCount":0,
		"getMemoryManagerNames":["PS MarkSweep","PS Scavenge"],
		"getPeakUsage":{
			"committed":67108864,
			"init":67108864,
			"max":1404043264,
			"used":13427488
		},
		"getUsage":{
			"committed":67108864,
			"init":67108864,
			"max":1404043264,
			"used":1342192
		},
		"isCollectionUsageThresholdExceeded":false,
		"isCollectionUsageThresholdSupported":true,
		"isUsageThresholdSupported":false,
		"toString":"[email protected]",
		"hashCode":380936215,
		"getClass":"sun.management.MemoryPoolImpl"
	},
	"java.lang:name=PS Survivor Space,type=MemoryPool":{
		"getName":"PS Survivor Space",
		"getType":"HEAP",
		"isValid":true,
		"getObjectName":{
			"canonicalKeyPropertyListString":"name=PS Survivor Space,type=MemoryPool",
			"domain":"java.lang",
			"domainPattern":false,
			"keyPropertyList":{
				"name":"PS Survivor Space",
				"type":"MemoryPool"
			},
			"keyPropertyListString":"type=MemoryPool,name=PS Survivor Space",
			"pattern":false,
			"propertyListPattern":false,
			"propertyPattern":false,
			"propertyValuePattern":false
		},
		"getCollectionUsage":{
			"committed":11010048,
			"init":11010048,
			"max":11010048,
			"used":0
		},
		"getCollectionUsageThreshold":0,
		"getCollectionUsageThresholdCount":0,
		"getMemoryManagerNames":["PS MarkSweep","PS Scavenge"],
		"getPeakUsage":{
			"committed":11010048,
			"init":11010048,
			"max":11010048,
			"used":2170912
		},
		"getUsage":{
			"committed":11010048,
			"init":11010048,
			"max":11010048,
			"used":0
		},
		"isCollectionUsageThresholdExceeded":false,
		"isCollectionUsageThresholdSupported":true,
		"isUsageThresholdSupported":false,
		"toString":"[email protected]",
		"hashCode":142638629,
		"getClass":"sun.management.MemoryPoolImpl"
	},
	"java.lang:name=PS Old Gen,type=MemoryPool":{
		"getName":"PS Old Gen",
		"getType":"HEAP",
		"isValid":true,
		"getObjectName":{
			"canonicalKeyPropertyListString":"name=PS Old Gen,type=MemoryPool",
			"domain":"java.lang",
			"domainPattern":false,
			"keyPropertyList":{
				"name":"PS Old Gen",
				"type":"MemoryPool"
			},
			"keyPropertyListString":"type=MemoryPool,name=PS Old Gen",
			"pattern":false,
			"propertyListPattern":false,
			"propertyPattern":false,
			"propertyValuePattern":false
		},
		"getCollectionUsage":{
			"committed":179306496,
			"init":179306496,
			"max":2852126720,
			"used":1979968
		},
		"getCollectionUsageThreshold":0,
		"getCollectionUsageThresholdCount":0,
		"getMemoryManagerNames":["PS MarkSweep"],
		"getPeakUsage":{
			"committed":179306496,
			"init":179306496,
			"max":2852126720,
			"used":1979968
		},
		"getUsage":{
			"committed":179306496,
			"init":179306496,
			"max":2852126720,
			"used":1979968
		},
		"getUsageThreshold":0,
		"getUsageThresholdCount":0,
		"isCollectionUsageThresholdExceeded":false,
		"isCollectionUsageThresholdSupported":true,
		"isUsageThresholdExceeded":false,
		"isUsageThresholdSupported":true,
		"toString":"[email protected]",
		"hashCode":707806938,
		"getClass":"sun.management.MemoryPoolImpl"
	},
	"java.lang:type=OperatingSystem":{
		"getCommittedVirtualMemorySize":469323776,
		"getFreePhysicalMemorySize":7017545728,
		"getFreeSwapSpaceSize":4161884160,
		"getProcessCpuLoad":0.10486990091779899,
		"getProcessCpuTime":1109375000,
		"getSystemCpuLoad":0.6793780209758321,
		"getTotalPhysicalMemorySize":17109733376,
		"getTotalSwapSpaceSize":23395414016,
		"getName":"Windows 10",
		"getObjectName":{
			"canonicalKeyPropertyListString":"type=OperatingSystem",
			"domain":"java.lang",
			"domainPattern":false,
			"keyPropertyList":{
				"type":"OperatingSystem"
			},
			"keyPropertyListString":"type=OperatingSystem",
			"pattern":false,
			"propertyListPattern":false,
			"propertyPattern":false,
			"propertyValuePattern":false
		},
		"getVersion":"10.0",
		"getArch":"amd64",
		"getAvailableProcessors":8,
		"getSystemLoadAverage":-1.0,
		"toString":"[email protected]",
		"hashCode":987405879,
		"getClass":"sun.management.OperatingSystemImpl"
	},
	"java.lang:type=Runtime":{
		"getName":"[email protected]",
		"getClassPath":"C:\\util\\IntelliJ IDEA 2019.3.3\\lib\\idea_rt.jar;C:\\util\\IntelliJ IDEA 2019.3.3\\plugins\\junit\\lib\\junit5-rt.jar;C:\\util\\IntelliJ IDEA 2019.3.3\\plugins\\junit\\lib\\junit-rt.jar;C:\\util\\jdk1.8.0_144\\jre\\lib\\charsets.jar;C:\\util\\jdk1.8.0_144\\jre\\lib\\deploy.jar;C:\\util\\jdk1.8.0_144\\jre\\lib\\ext\\access-bridge-64.jar;C:\\util\\jdk1.8.0_144\\jre\\lib\\ext\\cldrdata.jar;C:\\util\\jdk1.8.0_144\\jre\\lib\\ext\\dnsns.jar;C:\\util\\jdk1.8.0_144\\jre\\lib\\ext\\jaccess.jar;C:\\util\\jdk1.8.0_144\\jre\\lib\\ext\\jfxrt.jar;C:\\util\\jdk1.8.0_144\\jre\\lib\\ext\\localedata.jar;C:\\util\\jdk1.8.0_144\\jre\\lib\\ext\\nashorn.jar;C:\\util\\jdk1.8.0_144\\jre\\lib\\ext\\sunec.jar;C:\\util\\jdk1.8.0_144\\jre\\lib\\ext\\sunjce_provider.jar;C:\\util\\jdk1.8.0_144\\jre\\lib\\ext\\sunmscapi.jar;C:\\util\\jdk1.8.0_144\\jre\\lib\\ext\\sunpkcs11.jar;C:\\util\\jdk1.8.0_144\\jre\\lib\\ext\\zipfs.jar;C:\\util\\jdk1.8.0_144\\jre\\lib\\javaws.jar;C:\\util\\jdk1.8.0_144\\jre\\lib\\jce.jar;C:\\util\\jdk1.8.0_144\\jre\\lib\\jfr.jar;C:\\util\\jdk1.8.0_144\\jre\\lib\\jfxswt.jar;C:\\util\\jdk1.8.0_144\\jre\\lib\\jsse.jar;C:\\util\\jdk1.8.0_144\\jre\\lib\\management-agent.jar;C:\\util\\jdk1.8.0_144\\jre\\lib\\plugin.jar;C:\\util\\jdk1.8.0_144\\jre\\lib\\resources.jar;C:\\util\\jdk1.8.0_144\\jre\\lib\\rt.jar;C:\\Users\\Hex\\IdeaProjects\\search-java\\target\\classes;C:\\Users\\Hex\\.m2\\repository\\cglib\\cglib\\2.2.2\\cglib-2.2.2.jar;C:\\Users\\Hex\\.m2\\repository\\asm\\asm\\3.3.1\\asm-3.3.1.jar;C:\\Users\\Hex\\.m2\\repository\\junit\\junit\\4.13\\junit-4.13.jar;C:\\Users\\Hex\\.m2\\repository\\org\\hamcrest\\hamcrest-core\\1.3\\hamcrest-core-1.3.jar;C:\\Users\\Hex\\.m2\\repository\\com\\alibaba\\fastjson\\1.2.71\\fastjson-1.2.71.jar;C:\\util\\IntelliJ IDEA 2019.3.3\\lib\\idea_rt.jar",
		"getObjectName":{
			"canonicalKeyPropertyListString":"type=Runtime",
			"domain":"java.lang",
			"domainPattern":false,
			"keyPropertyList":{
				"type":"Runtime"
			},
			"keyPropertyListString":"type=Runtime",
			"pattern":false,
			"propertyListPattern":false,
			"propertyPattern":false,
			"propertyValuePattern":false
		},
		"getBootClassPath":"C:\\util\\jdk1.8.0_144\\jre\\lib\\resources.jar;C:\\util\\jdk1.8.0_144\\jre\\lib\\rt.jar;C:\\util\\jdk1.8.0_144\\jre\\lib\\sunrsasign.jar;C:\\util\\jdk1.8.0_144\\jre\\lib\\jsse.jar;C:\\util\\jdk1.8.0_144\\jre\\lib\\jce.jar;C:\\util\\jdk1.8.0_144\\jre\\lib\\charsets.jar;C:\\util\\jdk1.8.0_144\\jre\\lib\\jfr.jar;C:\\util\\jdk1.8.0_144\\jre\\classes",
		"getInputArguments":[
			"-ea",
			"-Didea.test.cyclic.buffer.size=1048576",
			"-javaagent:C:\\util\\IntelliJ IDEA 2019.3.3\\lib\\idea_rt.jar=54589:C:\\util\\IntelliJ IDEA 2019.3.3\\bin",
			"-Dfile.encoding=UTF-8"
		],
		"getLibraryPath":"C:\\util\\jdk1.8.0_144\\bin;C:\\Windows\\Sun\\Java\\bin;C:\\Windows\\system32;C:\\Windows;C:\\Windows\\system32;C:\\Windows;C:\\Windows\\System32\\Wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\Windows\\System32\\OpenSSH\\;C:\\Program Files (x86)\\Intel\\Intel(R) Management Engine Components\\DAL;C:\\Program Files\\Intel\\Intel(R) Management Engine Components\\DAL;C:\\util\\anaconda;C:\\Users\\Hex\\AppData\\Local\\Microsoft\\WindowsApps;C:\\util\\node-v10.16.2-win-x64;C:\\util\\Git\\bin;;C:\\util\\Microsoft VS Code\\bin;.",
		"getManagementSpecVersion":"1.2",
		"getSpecName":"Java Virtual Machine Specification",
		"getSpecVendor":"Oracle Corporation",
		"getSpecVersion":"1.8",
		"getStartTime":1592389790898,
		"getSystemProperties":{
			"sun.desktop":"windows",
			"awt.toolkit":"sun.awt.windows.WToolkit",
			"file.encoding.pkg":"sun.io",
			"java.specification.version":"1.8",
			"sun.cpu.isalist":"amd64",
			"sun.jnu.encoding":"GBK",
			"java.class.path":"C:\\util\\IntelliJ IDEA 2019.3.3\\lib\\idea_rt.jar;C:\\util\\IntelliJ IDEA 2019.3.3\\plugins\\junit\\lib\\junit5-rt.jar;C:\\util\\IntelliJ IDEA 2019.3.3\\plugins\\junit\\lib\\junit-rt.jar;C:\\util\\jdk1.8.0_144\\jre\\lib\\charsets.jar;C:\\util\\jdk1.8.0_144\\jre\\lib\\deploy.jar;C:\\util\\jdk1.8.0_144\\jre\\lib\\ext\\access-bridge-64.jar;C:\\util\\jdk1.8.0_144\\jre\\lib\\ext\\cldrdata.jar;C:\\util\\jdk1.8.0_144\\jre\\lib\\ext\\dnsns.jar;C:\\util\\jdk1.8.0_144\\jre\\lib\\ext\\jaccess.jar;C:\\util\\jdk1.8.0_144\\jre\\lib\\ext\\jfxrt.jar;C:\\util\\jdk1.8.0_144\\jre\\lib\\ext\\localedata.jar;C:\\util\\jdk1.8.0_144\\jre\\lib\\ext\\nashorn.jar;C:\\util\\jdk1.8.0_144\\jre\\lib\\ext\\sunec.jar;C:\\util\\jdk1.8.0_144\\jre\\lib\\ext\\sunjce_provider.jar;C:\\util\\jdk1.8.0_144\\jre\\lib\\ext\\sunmscapi.jar;C:\\util\\jdk1.8.0_144\\jre\\lib\\ext\\sunpkcs11.jar;C:\\util\\jdk1.8.0_144\\jre\\lib\\ext\\zipfs.jar;C:\\util\\jdk1.8.0_144\\jre\\lib\\javaws.jar;C:\\util\\jdk1.8.0_144\\jre\\lib\\jce.jar;C:\\util\\jdk1.8.0_144\\jre\\lib\\jfr.jar;C:\\util\\jdk1.8.0_144\\jre\\lib\\jfxswt.jar;C:\\util\\jdk1.8.0_144\\jre\\lib\\jsse.jar;C:\\util\\jdk1.8.0_144\\jre\\lib\\management-agent.jar;C:\\util\\jdk1.8.0_144\\jre\\lib\\plugin.jar;C:\\util\\jdk1.8.0_144\\jre\\lib\\resources.jar;C:\\util\\jdk1.8.0_144\\jre\\lib\\rt.jar;C:\\Users\\Hex\\IdeaProjects\\search-java\\target\\classes;C:\\Users\\Hex\\.m2\\repository\\cglib\\cglib\\2.2.2\\cglib-2.2.2.jar;C:\\Users\\Hex\\.m2\\repository\\asm\\asm\\3.3.1\\asm-3.3.1.jar;C:\\Users\\Hex\\.m2\\repository\\junit\\junit\\4.13\\junit-4.13.jar;C:\\Users\\Hex\\.m2\\repository\\org\\hamcrest\\hamcrest-core\\1.3\\hamcrest-core-1.3.jar;C:\\Users\\Hex\\.m2\\repository\\com\\alibaba\\fastjson\\1.2.71\\fastjson-1.2.71.jar;C:\\util\\IntelliJ IDEA 2019.3.3\\lib\\idea_rt.jar",
			"java.vm.vendor":"Oracle Corporation",
			"sun.arch.data.model":"64",
			"idea.test.cyclic.buffer.size":"1048576",
			"user.variant":"",
			"java.vendor.url":"http://java.oracle.com/",
			"user.timezone":"",
			"os.name":"Windows 10",
			"java.vm.specification.version":"1.8",
			"user.country":"CN",
			"sun.java.launcher":"SUN_STANDARD",
			"sun.boot.library.path":"C:\\util\\jdk1.8.0_144\\jre\\bin",
			"sun.java.command":"com.intellij.rt.junit.JUnitStarter -ideVersion5 -junit4 com.binary.search.gc.TestGc,invokeAllManagementFactory",
			"sun.cpu.endian":"little",
			"user.home":"C:\\Users\\Hex",
			"user.language":"zh",
			"java.specification.vendor":"Oracle Corporation",
			"java.home":"C:\\util\\jdk1.8.0_144\\jre",
			"file.separator":"\\",
			"line.separator":"\r\n",
			"java.vm.specification.vendor":"Oracle Corporation",
			"java.specification.name":"Java Platform API Specification",
			"java.awt.graphicsenv":"sun.awt.Win32GraphicsEnvironment",
			"sun.boot.class.path":"C:\\util\\jdk1.8.0_144\\jre\\lib\\resources.jar;C:\\util\\jdk1.8.0_144\\jre\\lib\\rt.jar;C:\\util\\jdk1.8.0_144\\jre\\lib\\sunrsasign.jar;C:\\util\\jdk1.8.0_144\\jre\\lib\\jsse.jar;C:\\util\\jdk1.8.0_144\\jre\\lib\\jce.jar;C:\\util\\jdk1.8.0_144\\jre\\lib\\charsets.jar;C:\\util\\jdk1.8.0_144\\jre\\lib\\jfr.jar;C:\\util\\jdk1.8.0_144\\jre\\classes",
			"user.script":"",
			"sun.management.compiler":"HotSpot 64-Bit Tiered Compilers",
			"java.runtime.version":"1.8.0_144-b01",
			"user.name":"Hex",
			"path.separator":";",
			"os.version":"10.0",
			"java.endorsed.dirs":"C:\\util\\jdk1.8.0_144\\jre\\lib\\endorsed",
			"java.runtime.name":"Java(TM) SE Runtime Environment",
			"file.encoding":"UTF-8",
			"java.vm.name":"Java HotSpot(TM) 64-Bit Server VM",
			"java.vendor.url.bug":"http://bugreport.sun.com/bugreport/",
			"java.io.tmpdir":"C:\\Users\\Hex\\AppData\\Local\\Temp\\",
			"java.version":"1.8.0_144",
			"user.dir":"C:\\Users\\Hex\\IdeaProjects\\search-java",
			"os.arch":"amd64",
			"java.vm.specification.name":"Java Virtual Machine Specification",
			"java.awt.printerjob":"sun.awt.windows.WPrinterJob",
			"sun.os.patch.level":"",
			"java.library.path":"C:\\util\\jdk1.8.0_144\\bin;C:\\Windows\\Sun\\Java\\bin;C:\\Windows\\system32;C:\\Windows;C:\\Windows\\system32;C:\\Windows;C:\\Windows\\System32\\Wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\Windows\\System32\\OpenSSH\\;C:\\Program Files (x86)\\Intel\\Intel(R) Management Engine Components\\DAL;C:\\Program Files\\Intel\\Intel(R) Management Engine Components\\DAL;C:\\util\\anaconda;C:\\Users\\Hex\\AppData\\Local\\Microsoft\\WindowsApps;C:\\util\\node-v10.16.2-win-x64;C:\\util\\Git\\bin;;C:\\util\\Microsoft VS Code\\bin;.",
			"java.vm.info":"mixed mode",
			"java.vendor":"Oracle Corporation",
			"java.vm.version":"25.144-b01",
			"java.ext.dirs":"C:\\util\\jdk1.8.0_144\\jre\\lib\\ext;C:\\Windows\\Sun\\Java\\lib\\ext",
			"sun.io.unicode.encoding":"UnicodeLittle",
			"java.class.version":"52.0"
		},
		"getUptime":852,
		"getVmName":"Java HotSpot(TM) 64-Bit Server VM",
		"getVmVendor":"Oracle Corporation",
		"getVmVersion":"25.144-b01",
		"isBootClassPathSupported":true,
		"toString":"[email protected]",
		"hashCode":1451043227,
		"getClass":"sun.management.RuntimeImpl"
	}
}


 

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/qq_21078159/article/details/106815899

智能推荐

安装tensonflow:在Windows10&Anaconda环境下(彻底解决ImportError : No Moduled Name "tensorflow"/_pywrap_ten等一类问题)_tensorboard显示 no module named '_pywrap_tensorflow_Witness、的博客-程序员秘密

版本:V2.0,2018-10-09 18:42:52v3.0,2018.11.23这个帖子随着我的理解不断加深,会不断对以前描述不详实之处进行修改与更新写作动力:为了完成吴恩达教授的Deeplearing公开课的课后作业,需要在jupyter notebook中使用tensorflow模块。作为一个刚入坑的小白,第一次接触tf并不会配置,足足花了5天的时间才踩完所有的坑弄好,...

6-3 求链式表的表长 (10分)_摺耳喵的博客-程序员秘密

本题要求实现一个函数,求链式表的表长。函数接口定义:int Length( List L );其中List结构定义如下:typedef struct LNode *PtrToLNode;struct LNode { ElementType Data; PtrToLNode Next;};typedef PtrToLNode List;L是给定单链表,函数Length要返回链式表的长度。裁判测试程序样例:#include &lt;stdio.h&gt;#include

进程间通信_风雅飘零的博客-程序员秘密

转自:https://www.sohu.com/a/412809361_298038进程间通信每个进程的用户地址空间都是独立的,一般而言是不能互相访问的,但内核空间是每个进程都共享的,所以进程之间要通信必须通过内核。Linux 内核提供了不少进程间通信的机制,我们来一起瞧瞧有哪些?03管道如果你学过 Linux 命令,那你肯定很熟悉「|」这个竖线。$ ps auxf |grepmysql上面命令行里的「|」竖线就是一个管道,它的功能是将前一个命令(ps auxf)的输出.

Android 6.0一直到最新9.0的拍照权限及文件读写权限获取_Sumtudou的博客-程序员秘密

首先这么问题大家可以在CSDN上找到n多博客,亲测80%用不了……首先在6.0以后的危险权限需要动态获取。所以申请要分为两个部分。先在AndroidManifest中获取一次权限 &amp;lt;!--拍照--&amp;gt; &amp;lt;uses-permission android:name=&quot;android.permission.CAMERA&quot; /&amp;gt; &amp;lt;!--...

【蓝桥杯】 斐波那契数列最大公约数:斐波那契数列满足 F1=F2=1,从F3开始有 Fn=F(n-1)+F(n-2) 。 请你计算 GCD(F2020,F520),其中 GCD(A,,B) 表示..._斐波那契数列f3_煦梦旖溪的博客-程序员秘密

【蓝桥杯】 斐波那契数列最大公约数题目描述解题思路解题代码C语言题目描述题目传送门 &gt;&gt; 斐波那契数列最大公约数 【问题描述】斐波那契数列满足 F1=F2=1F_1=F_2=1F1​=F2​=1,从F3F_3F3​开始有 Fn=F(n−1)+F(n−2)Fn=F_(n-1)+F_(n-2)Fn=F(​n−1)+F(​n−2) 。请你计算 GCD(F2020,F520),其中 GCD(A,B) 表示 A 和 B 的最大公约数。【运行限制】• 最大运行时间:1s• 最大运行内存:

SpringBoot:整合Swagger3.0与RESTful接口整合返回值(2020最新最易懂)_Java架构师课代表的博客-程序员秘密

不用多说,相信大家都有一个共识:无论什么行业,最牛逼的人肯定是站在金字塔端的人。所以,想做一个牛逼的程序员,那么就要让自己站的更高,成为技术大牛并不是一朝一夕的事情,需要时间的沉淀和技术的积累。关于这一点,在我当时确立好Java方向时,就已经开始梳理自己的成长路线了,包括技术要怎么系统地去学习,都列得非常详细。4面拿下了字节跳动offer大三下学期找了一家互联网公司实习,大四的时候就已经在开始规划毕业后的打算了,关于校招也在着手准备中,当然目标要放高一些,所以阿里、腾讯这些自然要尝..

随便推点

Basler相机配置文件解析 及 加载代码_baobei0112的博客-程序员秘密

# {05D8C294-F295-4dfb-9D01-096BD04049F4}# GenApi persistence file (version 3.1.0)# Device = Basler::GigECamera -- Basler generic GigEVision camera interface -- Device version = 3.8.0 -- Product GUID = 1F3C6A72-7842-4edd-9130-E2E90A2058BA -- Product v...

php-resque 极简php消息队列_chikengjue5325的博客-程序员秘密

安装首先这货需要在linux下跑,非得用windows就别看了,也不是不能装,费劲且性能渣得有composer,嫌慢的也拉倒吧,别看了,本文不介绍没有composer怎么办安装composer也不是本文要点,在ubuntu(其实为了不折腾QQ我装的是deepin)中就是一行命令php...

SAP_MM常用事务代码_采购申请反审批 事务代码_湖东的博客-程序员秘密

1、采购申请创建/修改/查看:ME51N/ME52N/ME53N 2、采购申请审批:ME54N 3、采购订单创建/修改/查看:ME21N/ME22N/ME23N 4、单个采购订单审批:ME29N 5、批量采购订单审批:ME28 6、收货/货物移动:MIGO、MB1A、MB1B、MB1C 7、查看物料凭证:MB03、MB51 8、库存总览:MMBE 9、物料仓库库存清单:MB52 ...

状态机和行为树_行为树和状态机区别_PresleyGo的博客-程序员秘密

对游戏NPC的行为控制一般有2种,一种是状态机,一种是行为树。状态机:Unity对人物动画的控制是基于状态机的,如下图:可以看到,每个状态除了包含自身的状态行为外,还需要和其他的状态打交道,需要输入状态机之间切换的条件。因为这一点,导致增加状态会使得状态机越来越复杂。状态机是一种网状结构,耦合性很大。行为树:图片源自:https://blog.csdn.net/goo...

Java socket 编程遇到的异常java.net.SocketException: Software caused connection abort: socket write error_佐月儿的博客-程序员秘密

这个异常是我遇到是在多线程访问服务器端的时候,由于多线程不安全,线程提前关闭了socket对象导致的public class Server { public static void main(String[] args) throws IOException { ServerSocket serverSocket = new ServerSocket(8888)...

tastypie使用_furuiyang_的博客-程序员秘密

1 首先就是按照常规流程创建虚拟环境,并且在虚拟环境中创建了Django项目。2 然后安装django-tastypie$ pip install django-tastypie3 创建文件expenses/models.py,用来存放和tastypie相关的一些东西。假设我们的项目是用来解决一些关于一个叫Expense的资源的示例。我们就在expenses/models.py...

推荐文章

热门文章

相关标签