Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JConsole location in Linux

I am trying to run jconsole from my machine but I can't find the location of the .sh . I have tried finding it in different directories and setting JAVA_HOME to the jdk.

$which java
/usr/bin/java
$java -version
java version "1.7.0_51"
OpenJDK Runtime Environment (rhel-2.4.4.1.el6_5-x86_64 u51-b02)
OpenJDK 64-Bit Server VM (build 24.45-b08, mixed mode) 
$whereis java 
java: /usr/bin/java /etc/java /usr/lib/java /usr/share/java /usr/share/man/man1/java.1.gz

I looked in /usr/lib/jvm and I found

drwxr-xr-x. 3 root root 4096 Apr 23  2013 java-1.5.0-gcj-1.5.0.0
drwxr-xr-x. 3 root root 4096 Jan 27  2014 java-1.6.0-openjdk-1.6.0.0.x86_64
drwxr-xr-x. 3 root root 4096 Feb  5  2014 java-1.7.0-openjdk-1.7.0.51.x86_64
lrwxrwxrwx. 1 root root   21 Feb  5  2014 jre -> /etc/alternatives/jre
lrwxrwxrwx. 1 root root   27 Apr 23  2013 jre-1.5.0 -> /etc/alternatives/jre_1.5.0
lrwxrwxrwx. 1 root root   26 Apr 23  2013 jre-1.5.0-gcj -> java-1.5.0-gcj-1.5.0.0/jre
lrwxrwxrwx. 1 root root   27 Feb  5  2014 jre-1.6.0 -> /etc/alternatives/jre_1.6.0
lrwxrwxrwx. 1 root root   37 Feb  5  2014 jre-1.6.0-openjdk.x86_64 -> java-1.6.0-openjdk-    1.6.0.0.x86_64/jre
lrwxrwxrwx. 1 root root   27 Feb  5  2014 jre-1.7.0 -> /etc/alternatives/jre_1.7.0
lrwxrwxrwx. 1 root root   38 Feb  5  2014 jre-1.7.0-openjdk.x86_64 -> java-1.7.0-openjdk-1.7.0.51.x86_64/jre
lrwxrwxrwx. 1 root root   25 Apr 23  2013 jre-gcj -> /etc/alternatives/jre_gcj
lrwxrwxrwx. 1 root root   29 Feb  5  2014 jre-openjdk -> /etc/alternatives/jre_openjdk

and in java-1.7.0-openjdk-1.7.0.51.x86_64/jre/bin/, I only found

[root@portal01 bin]# ll
total 200
-rwxr-xr-x. 1 root root  9536 Jan 14  2014 java
-rwxr-xr-x. 1 root root  9656 Jan 14  2014 keytool
-rwxr-xr-x. 1 root root  9856 Jan 14  2014 orbd
-rwxr-xr-x. 1 root root  9688 Jan 14  2014 pack200
-rwxr-xr-x. 1 root root 10984 Jan 14  2014 policytool
-rwxr-xr-x. 1 root root  9648 Jan 14  2014 rmid
-rwxr-xr-x. 1 root root  9656 Jan 14  2014 rmiregistry
-rwxr-xr-x. 1 root root  9688 Jan 14  2014 servertool
-rwxr-xr-x. 1 root root  9896 Jan 14  2014 tnameserv
-rwxr-xr-x. 1 root root 92264 Jan 14  2014 unpack200

..even though there are 200 files. How can I find and run jconsole?

like image 513
M2201 Avatar asked Sep 30 '14 14:09

M2201


3 Answers

jconsole is part of the Java SDK, it appears you only have the JRE installed.

like image 126
Larry Avatar answered Nov 08 '22 17:11

Larry


You can run jconsole directly from your terminal by running the command jconsole.

reena@IM-1500:~$ jconsole

It will launch java monitoring console dialog.

like image 33
Reena Upadhyay Avatar answered Nov 08 '22 18:11

Reena Upadhyay


From https://serverfault.com/questions/179908/fedora-jconsole-location:

Try running: yum provides */jconsole

that will tell you what package you need as well as where it's located in the package.

like image 3
Joe Avatar answered Nov 08 '22 18:11

Joe