Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where is tools.jar located?

Tags:

java

tools.jar

Running CentOS 6, Java 1.7.0_25 OpenJDK

Upon installing the RPM I saw it say

Unpacking JAR files...
rt.jar
jsee.jar
charsets.jar
>tools.jar

Where is tools.jar located? I checked /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.25.x86_64

No where to be found.

like image 685
Necro. Avatar asked Aug 05 '13 15:08

Necro.


3 Answers

Not sure what rpm you used, but if you install from yum repo, you should install java-1.7.0-openjdk-devel in addition to java-1.7.0-openjdk.

Then you will find tools.jar in /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.xx.x86_64/lib directory.

like image 75
limilaw Avatar answered Oct 19 '22 17:10

limilaw


On Linux, you can use locate tools.jar to find where the file is.

Typically, it should be in the lib/ directory of your jvm. On Ubuntu/Debian, it is located in directory /usr/lib/jvm/java-xxxxx/lib/tools.jar.

For example, with openjdk 7, on amd64, I'll find it under /usr/lib/jvm/java-7-openjdk-amd64/lib/tools.jar.

I have no installation to check it, but I think that the directory structure is the same under CentOS (cf. https://serverfault.com/questions/50883/what-is-the-value-of-java-home-for-centos)

like image 7
alci Avatar answered Oct 19 '22 17:10

alci


Linux Centos 6,

you can use sudo find / -name "tools.jar" command to find the file location.

tools.jar is normally located under /usr/lib/jvm/java-1.7.0.70.x86_64/lib/tools.jar

tools.jar is not in JRE.

My case, tools.jar file is generated only after installing java-1.7.0-openjdk-devel.

sudo yum install java-1.7.0-openjdk-devel

like image 6
ling Avatar answered Oct 19 '22 17:10

ling