Download presentation
Presentation is loading. Please wait.
1
Java Jar Files Bar-Ilan University 2004-2005 תשס"ה by Moshe Fresko
2
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 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
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."
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.