jmx分析 gc 了解JVM内存结构

GarbageCollectorMXBean gcBean = ManagementFactory.

newPlatformMXBeanProxy(mbs, gc.toString(),GarbageCollectorMXBean.class);

快速分析线上java应用消耗资源

最近发现一个很好的useful-shell,用于快速打印线程消耗cpu的top 5;闲话不多说,看看怎么用吧!

$ wget https://raw.githubusercontent.com/iqiancheng/useful-scripts/master/show-busy-java-threads.sh

$ chmod u+x show-busy-java-threads.sh

$ ./......

遇见这些Java常见异常是怎样的一种体验?

java.lang

异常类

优雅的解释

ArithmeticException

你正在试图使用电脑解决一个自己解决不了的数学问题,请重新阅读你的算术表达式并再次尝试。

ArrayIndexOutOfBoundsException

请查看 IndexOutOfBoundsException。不同之处在于这个异常越界的元素不止一个。

ArrayStoreException

你已......