Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

can anyone explain me the functionality of tools.jar( which is bundled in jdk/lib folder) and why it's required?

Tags:

java

I have come across with tools.jar file in java.So,want to know about it that what exactly it is used for?I have search a lot but can't find a doc. It will really helpful if someone can specify me its details as i am new to java. Thanks.

like image 590
Suresh Avatar asked Jun 20 '13 08:06

Suresh


People also ask

What is a JAR file used for in JDK?

See JDK Release Notes for information about new features, enhancements, and removed or deprecated options for all JDK releases. JAR files are packaged with the ZIP file format, so you can use them for tasks such as lossless data compression, archiving, decompression, and archive unpacking.

What are some common JAR file operations?

Common JAR file operations Operation Command To create a JAR file jar cf jar-file input-file (s) To view the contents of a JAR file jar tf jar-file To extract the contents of a JAR file jar xf jar-file To extract specific files from a JAR fil ... jar xf jar-file archived-file (s) 2 more rows ...

How can I view a JAR file's table of contents?

You can display a JAR file's table of contents to see what it contains without actually unpacking the JAR file. You can use the Jar tool to unpack a JAR file.

How do I open a JAR file without unpacking it?

You can display a JAR file's table of contents to see what it contains without actually unpacking the JAR file. You can use the Jar tool to unpack a JAR file. When extracting files, the Jar tool makes copies of the desired files and writes them to the current directory, reproducing the directory structure that the files have in the archive.


2 Answers

tools.jar will give support to your daily-use java commands, e.g. javac, javap. It also contains some infrastructures for JMI and applet.

You can use jar xvf tools.jar to unjar the package and get some knowledge from the file hierarchy.

like image 36
Summer_More_More_Tea Avatar answered Sep 30 '22 02:09

Summer_More_More_Tea


In tools.jar are all tools that are needed by a JDK but not a JRE.

Included in tools.jar is e.g. the compiler javac and the tool javadoc. All tools needed to develop in Java are included in this .jar file.

like image 176
Uwe Plonus Avatar answered Sep 30 '22 02:09

Uwe Plonus