Ben Chuanlong Du's Blog

It is never too late to learn.

Useful Java Libraries

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

General Purpose Java Libraries

Guava

Guava is a high-quality general purpose Java opensource library mainly developed by Google. It has good immutable collection implementations which are preferred to Java's built-in immutable …

Memory in JVM

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

Stack, heap and off-heap are all memory that stored in a computer's RAM.

Stack

Stack is used for static memory allocation. Variables allocated on the stack are stored directly to the …

Async Framework for JVM-based Languages

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

RxJava

RxJava is a reactive extensions for the JVM – a library for composing asynchronous and event-based programs using observable sequences for the Java VM.

Debugging Tools for Java

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

arthas

arthas

JDK commands

Thread dump: jstack jvm_pid > (use -F if not responding)

Memory dump: jmap -dump:live,format=b,file=.hprof jvm_pid

Heap status: jmap -heap jvm_pid

GC status: jstat …

Misc Tips on Java

Tips and Traps

  1. Use == (instead of the method Object.equals) to compare objects is a common and tricky mistake for beginner.

  2. You cannot define an abstract static method. This is because "abstract" means that no functionality is implemented while "static" means that functionality exists even there is no object. The two conflict in concept.