Jar Archiving

Jussi Pohjolainen

Tampere Polytechnic University of Applied Sciences » ICT

Intro to Jar packaging

Using JAR-files

Creating a JAR-file

Other options include

        v - Tells the name of each file it's added to the JAR-file
        0 - Store only, does not use ZIP compressioin
        M - Does not create default manifest file
        m - Includes given manifest file
        

Example creating JAR-file

Above command created a compressed file, that contains following files and directory hierarchy

META-INF/MANIFEST.MF
Application.class
MyWindow.class
MyWindow$1.class
bird.png
birdpeck.png

Showing contents and extracting

Running JAR file (as App)

Intro to Manifest files

Creating your own manifest file

Example

Files