Extract Entries "jar -x" Command Syntax
What are syntax rules of the "jar -x" command for extracting entries from a JAR file? I am confused on how to specify different options, like v and f.
The "jar -x" command allows you to extract entries from an existing JAR file to the current folder. It has the follow syntax:
jar -x[vf] [jar-file] [pattern]
"v" option flag returns verbose information on standard output for each entry extracted. If "v" is not specified, nothing shows up on the standard output.
"f" option flag specifies the JAR file. If "f" is specified, "jar-file" must be provided. If "f" is not specified, the JAR file is read from the standard input.
If "pattern" specified, only those entries that match the pattern will be extracted If not specified, all entries in the JAR will be extracted.
Here are some example of valid "jar -x" commands
jar -xf activation.jar Extract all entries in the JAR jar -xf activation.jar com/sun/activation/viewers/Image Extract all entries that matches the given pattern jar -xvf activation.jar Extract all entries with information on the standard output type activation.jar | jar -xv Read the JAR file from the standard input
Back to FAQ for JDK JAR (Java ARchive) Tool.
2016-05-22, 1655👍, 0💬
How to download and install ojdbc14.jar for Oracle 10g R2? ojdbc14.jar for Oracle 10g R2 is a Java 1...
What Is javaws.jar in JRE (Java Runtime Environment) 8? javaws.jar in JRE (Java Runtime Environment)...
The SOAP with Attachments API for JavaTM (SAAJ) 1.3 provides the API for creating and sending SOAP m...
How to read XML document with DTD validation from socket connections with the socket\DelayedInput.ja.. .
JRE 8 rt.jar is the JAR file for JRE 8 RT (Runtime) libraries. JRE (Java Runtime) 8 is the runtime e...