In computing, a JAR file (or Java Archive) is a ZIP file used to distribute a set of Java classes. It is used to store compiled Java classes and associated metadata that can constitute a program.
JAR files can be created and extracted using the "jar" command that comes with the JDK. Alternatively it can be done using zip tools.
A JAR file has a manifest file located in the path META-INF/MANIFEST.MF. The entries in the manifest file determine how the JAR file will be used. JAR files which are intended to be executed as standalone programs will have one of their classes specified as the "main" class. The manifest file would have an entry such as
Main-Class:myPrograms.MyClass
A JAR file can be digitally signed. If so, the signature information is added to the manifest file.
Such JAR files are typically started with a command similar to
java -jar foo.jar
In JDK 1.1, the manifest file contained a list of all files contained in the JAR file.
JAR files can be obfuscated so that a user of the JAR file doesn't get much information regarding the code it contains.
There is not much documentation around for this utility. GNU Project has this brief introduction. However, this is the jar version distributed with many Linux distributions and also with Cygwin for windows.
Archive formats | Java platform
Java Archive | Java Archive | JAR | Jar | JAR | Java Archive | Java Archive | JAR | Jar | JAR | Java Archive | Java Archive | JAR | Jar | JAR | Java Archive | Java Archive | JAR | Jar | JAR
This article is licensed under the GNU Free Documentation License.
It uses material from the
"JAR (file format)".
Home Page • arts • business • computers • games • health • hospitals • home • kids & teens • news • physicians • recreation• reference • regional • science • shopping • society • sports • world