Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (102)
JavaBeans (21)
JDBC (121)
JDK (426)
JSP (20)
Logging (108)
Mail (58)
Messaging (8)
Network (84)
PDF (97)
Report (7)
Scripting (84)
Security (32)
Server (121)
Servlet (26)
SOAP (24)
Testing (54)
Web (15)
XML (322)
Collections:
Other Resources:
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.
✍: FYIcenter.com
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, ∼3727🔥, 0💬
Popular Posts:
JDK 17 jdk.internal.le.jmod is the JMOD file for JDK 17 Internal Line Editing module. JDK 17 Interna...
JDK 17 jdk.compiler.jmod is the JMOD file for JDK 17 Compiler tool, which can be invoked by the "jav...
What Is mail.jar of JavaMail 1.4? I got the JAR file from javamail-1_4.zip. mail.jar in javamail-1_4...
xml-commons External Source Code Files are provided in the source package file, xml-commons-external...
Apache Commons Lang 3 is the 3rd version of Apache Commons Lang, which provides a host of helper uti...