1 / 5

Java Jar Files

Java Jar Files. Bar-Ilan University 2004-2005 תשס"ה by Moshe Fresko. Why Jar Files ?. The Java TM Archive (JAR) file format enables one to bundle multiple files into a single archive file. JAR provides many benefits Security Decreased download time Compression

ahmed-case
Télécharger la présentation

Java Jar Files

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Java Jar Files Bar-Ilan University 2004-2005 תשס"ה by Moshe Fresko

  2. Why Jar Files ? • The JavaTM Archive (JAR) file format enables one to bundle multiple files into a single archive file. • JAR provides many benefits • Security • Decreased download time • Compression • Packaging for extensions • Package sealing • Package versioning • Portability

  3. Jar Basics • Using Jar Tool provided by JDK • To create a jar file • jar cf jar-file input-file(s) • To view the contents of a jar file • jar tf jar-file • Extract the contents of a jar file • jar xf jar-file • To run an application package • java -jar app.jar • To invoke an applet packaged as a JAR file • <applet code=MyApplet.class archive=“MyJar.jar" width=100 height=50> </applet>

  4. Manifest File • When you create a JAR file, it automatically receives a default manifest file. • META-INF/MANIFEST.MF Manifest-Version: 1.0 Created-By: 1.4.2 (Sun Microsystems Inc.) • Application in a JAR file. • The class name having main(String[]) Main-Class: classname

  5. Manifest File • Package Sealing Name: myCompany/myPackage/ Sealed: true • Package Versioning Name: java/util/ Specification-Title: "Java Utility Classes" Specification-Version: "1.2" Specification-Vendor: "Sun Microsystems, Inc.". Implementation-Title: "java.util" Implementation-Version: "build57" Implementation-Vendor: "Sun Microsystems, Inc."

More Related