JConsole location on Linux

I am trying to start jconsole from my machine, but I cannot find the .sh location. I tried looking for it in different directories and setting JAVA_HOME in 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 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 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

      

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

+3


source to share


5 answers


jconsole is part of Java SDK, it seems like you only have JRE installed.



+4


source


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

reena @ IM-1500: ~ $ jconsole



It will launch the java monitoring console dialog.

+3


source


Once you have set the JDK path in Linux, this command is easy, you may not have enabled JAVA_HOME with your PATH variable.

plz follow this discussion

+1


source


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

Try running: yum provides * / jconsole

which will tell you which package you need as well as where it is in the package.

0


source


If you have Java JDK installed on your Linux machine, it jconsole

is usually found /usr/bin/

as a symbolic link.

An example from my Linux VM running Centos6

$ which jconsole
/usr/bin/jconsole
$ ls -l /usr/bin/jconsole
lrwxrwxrwx. 1 root root 26 Sep  4 10:05 /usr/bin/jconsole -> /etc/alternatives/jconsole
$ ls -l /etc/alternatives/jconsole
lrwxrwxrwx. 1 root root 51 Sep  4 10:05 /etc/alternatives/jconsole -> /usr/lib/jvm/java-1.7.0-openjdk.x86_64/bin/jconsole

      

But you mentioned that you received an error command not found

while typing jconsole

at the prompt. Can you find out if jconsole

jdk is available in one of the bin directories?

$ ls -l /usr/lib/jvm/java-1.7.0-openjdk.x86_64/bin | grep jconsole

      

If yes add this to your environment variable PATH

as shown below

$ export PATH=$PATH:/usr/lib/jvm/java-1.7.0-openjdk.x86_64/bin

      

or put this in yours ~/.bashrc

if you are using Bash

.

If it jconsole

doesn't exist, you might need to try another jdk that you installed or reinstall jdk.

0


source







All Articles