jvm-jvm可视化监控工具

JConsole首次使用

例子

public class JconsoleDemo {

private byte[] b=new byte[128*1204];

public static void main(String[] args) {

	try {
		Thread.sleep(10000);
	} catch (InterruptedException e) {
		// TODO Auto-generated catch block
		e.printStackTrace();
	}

	System.out.println("start...................");
	fill(1000);



}

public static void fill(int n) {

	List<JconsoleDemo> list=new ArrayList<>();

	for(int i=0;i<n;i++) {
		try {
			Thread.sleep(100);
		} catch (InterruptedException e) {
			e.printStackTrace();
		}
		list.add(new JconsoleDemo());
	}

}

}

posted @ 2019-06-22 14:04  potatoyam  阅读(648)  评论(0编辑  收藏  举报