问题
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.
回答1:
On windows, I could find it at \jdk1.7.0\lib
. You can find java directory structure here
回答2:
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.
回答3:
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)
回答4:
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
回答5:
No,it should be in in Lib
folder
JDK and JRE File Structure
c:\jdkx.x.x\lib
Files used by the development tools. These include tools.jar, which contains non-core classes for support of the tools and utilities in the JDK. Also includes dt.jar, the DesignTime archive of BeanInfo files that tell interactive development environments (IDE's) how to display the Java components and how to let the developer customize them for an application.
来源:https://stackoverflow.com/questions/18061887/where-is-tools-jar-located