'jar' - JAR File Tool Command and Options

This section describes the 'jar' command to manage JAR files. 'jar' command syntax and options are provided.

"jar": A command line tool for managing JAR files. "jar" is distributed as part of the Sun JDK package. It has some interesting features:

"jar" command syntax:

Create jar file 
jar c[v0M]f jarfile inputfiles 
jar c[v0]mf manifest jarfile inputfiles

Update jar file 
jar u[v0M]f jarfile inputfiles
jar u[v0]mf manifest jarfile inputfiles

Extract jar file 
jar x[v]f jarfile [inputfiles]

List table of contents of jar file 
jar t[v]f jarfile [inputfiles]


"jar" command is supported by the file, \progra~1\java\jdk*\bin\jar.exe, if you installed JDK as in the previous chapter.

Last update: 2015.

Table of Contents

 About This Book

 Java Tools Terminology

 Installing Java 8 on Windows

 'javac' - The Java Program Compiler

 'java' - The Java Program Launcher

 'jdb' - The Java Debugger

 'jconsole' - Java Monitoring and Management Console

 'jstat' - JVM Statistics Monitoring Tool

 JVM Troubleshooting Tools

 jvisualvm (Java VisualVM) - JVM Visual Tool

'jar' - The JAR File Tool

 JAR - Java Archive File Format

'jar' - JAR File Tool Command and Options

 Creating the First JAR File - hello.jar

 Managing JAR Files with WinZIP



 Using JAR Files in Java Class Paths

 Creating Executable JAR Files

 'javap' - The Java Class File Disassembler

 'keytool' - Public Key Certificate Tool

 'native2ascii' - Native-to-ASCII Encoding Converter

 Outdated Tutorials


 PDF Printing Version