 |
JAR is an acronym for Java Archive. It typically contains Java class files and a manifest which provides meta-information. Jar files are the standard way to distribute
Java libraries, applets, and applications. They are compressed using zip.
The Java tutorial has information on how to use Jars.
To create a jar file:
- use the jar program included in every Java JDK.
- use the jar task for Apache Ant.
- use WinZip or any other zip compression utility.
- use Java! The Java runtime includes powerful zip and jar tools. It is possible to create a Java program or servlet that jars classes when executed. A constructed JAR file could be useful for Applets.
Sometimes a JAR file is not appropriate for distributing a Java application. All of these formats are similar to Jar, but with a different purpose:
- Web applications are distributed as WAR files, which include classes and servlets, JSP and HTML pages, and meta-information in XML.
- Enterprise applications are distributed as EAR files.
- Services are distributed as SAR files.
Open source utilities
Also See
Discussion about JAR
|