tags:

views:

19

answers:

1

Hi.

Does anyone know if JRE (not JDK) has diagnostics tools, such as jps, jstack, jhat and so on?

Or these tools only present in JDK?

Thanks.

+2  A: 

These files are all you have in the jre (jre1.6.0_20 linux):

rwxrwxrwx 1 bob bob     10 2010-05-12 19:40 ControlPanel -> ./jcontrol
-rwxr-xr-x 1 bob bob  47308 2010-04-12 22:36 java
-rwxr-xr-x 1 bob bob  25634 2010-04-12 22:39 java_vm
-rwxr-xr-x 1 bob bob  84970 2010-04-12 22:39 javaws
-rwxr-xr-x 1 bob bob   6347 2010-04-12 22:39 jcontrol
-rwxr-xr-x 1 bob bob  47447 2010-04-12 22:36 keytool
-rwxr-xr-x 1 bob bob  47679 2010-04-12 22:36 orbd
-rwxr-xr-x 1 bob bob  47515 2010-04-12 22:36 pack200
-rwxr-xr-x 1 bob bob  47807 2010-04-12 22:36 policytool
-rwxr-xr-x 1 bob bob  47447 2010-04-12 22:36 rmid
-rwxr-xr-x 1 bob bob  47447 2010-04-12 22:36 rmiregistry
-rwxr-xr-x 1 bob bob  47475 2010-04-12 22:36 servertool
-rwxr-xr-x 1 bob bob  47679 2010-04-12 22:36 tnameserv
-rwxr-xr-x 1 bob bob 189274 2010-04-12 22:36 unpack200

So, the answer is that they are only present in the JDK.

davey
So this means I need to install them on every server...Or maybe there is another way to get diagnostic info locally?
SyBer
You can get the stack trace with kill -QUIT <PID>. and you can start the jvm with JMX: ``/jre1.6.0_20/bin/java -Dcom.sun.management.jmxremote -jar jpws-0-5-0.jar``As long as you do that and enable it to be managed from another machine then no you would not need to put the JDK on every machine.
davey
You can start the jvm with JMX: ``/jre1.6.0_20/bin/java -Dcom.sun.management.jmxremote -jar jpws-0-5-0.jar``As long as you do that and enable it to be managed from another machine then no you would not need to put the JDK on every machine
davey
Thanks, makes sense.
SyBer