[java] How to get the number of threads in a Java process