Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (101)
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 (309)
Collections:
Other Resources:
"jar -uvf" to Update a JAR with Replacement Folder
What is the "jar" command to replace some class files in a JAR? I have recompiled classes in a folder ready to replace those same classes in a JAR file.
✍: FYIcenter.com
To replace existing class files in an existing JAR file, you can use the "jar -uvf jarname foldername" command.
For example, the following session updates an existing JAR file with all classes in the .\javax folder:
\fyicenter>"%java_home%\bin\jar" -xvf jms.jar \fyicenter>"%java_home%\bin\jar" -cvf myNew.jar .\javax (Recompile all classes under .\javax, if you the source code) \fyicenter>"%java_home%\bin\jar" -uvf myNew.jar .\javax adding: javax/(in = 0) (out= 0)(stored 0%) adding: javax/jms/(in = 0) (out= 0)(stored 0%) adding: javax/jms/BytesMessage.class(in = 1202) (out= 494)(deflated 58%) adding: javax/jms/Connection.class(in = 945) (out= 373)(deflated 60%) adding: javax/jms/ConnectionConsumer.class(in = 275) (out= 189)(deflated 31% adding: javax/jms/ConnectionFactory.class(in = 311) (out= 179)(deflated 42%) adding: javax/jms/ConnectionMetaData.class(in = 544) (out= 271)(deflated 50% adding: javax/jms/DeliveryMode.class(in = 207) (out= 160)(deflated 22%) adding: javax/jms/Destination.class(in = 113) (out= 95)(deflated 15%) ...
Back to FAQ for JDK JAR (Java ARchive) Tool.
2015-11-07, 6948🔥, 0💬
Popular Posts:
The Web Services Description Language for Java Toolkit (WSDL4J), Release 1.6.2, allows the creation,...
Snappy-Java is a Java port of the "snappy", a fast C++ compresser/decompresser developed by Google. ...
Apache BCEL Source Code Files are inside the Apache BCEL source package file like bcel-6.6.1-src.zip...
What Is activation.jar? I heard it's related to JAF (JavaBeans Activation Framework) 1.0.2? The if y...
xml-commons Resolver Source Code Files are provided in the source package file, xml-commons-resolver...