Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why java8 server JRE do not contain server specific tools like jstack, jmap, jvisualvm, jstat

Tags:

java

From oracle

The Server JRE includes tools for JVM monitoring and tools commonly required for server applications, but does not include browser integration (the Java plug-in).

From the server side tools usage, the list of tools which tops for monitoring are jstack, jvisualvm, jstat, jconsole; all are missing from the jdk/bin of server jre bundle.

Any idea of the rational behind this bundling.

Edit

This is the case only for "server jre 8". For "server jre 7" all these tools where present.

like image 722
Atul Soman Avatar asked Apr 13 '15 12:04

Atul Soman


1 Answers

After some research, I have found that many of the "missing" tool functionalities are actually still available.

For example jcmd can do the same and more than jstack. To take a thread dump in severe jre 8, use jcmd $PID Thread.print.

jconsole tool functionality is indirectly available, even though jconsole is missing in bin, the jconsole.jar is there in the lib folder and you can execute it using java -jar lib/jconsole.jar to get the same old functionality.

jcmd can also be used to get other memory/gc stats. Run jcmd $pid help to see more info.

So with these tools, I think it's fine to get the same feature set in server jre 8 as we used to get in server jre 7 and it might be removed from server jre 8 to remove redundancy.

like image 163
Atul Soman Avatar answered Oct 10 '22 18:10

Atul Soman