This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Java in General and the fly likes Jar/Unjar using JAVA Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Jar/Unjar using JAVA" Watch "Jar/Unjar using JAVA" New topic
Author

Jar/Unjar using JAVA

renu richard
Ranch Hand

Joined: Oct 06, 2008
Posts: 116
Hi,
IN UNIX and DOS, we have jar and unjar command, using which we can jar and unjar a jar file. I googled to find the how this can be done in java. Got couple of sites, but it seems to be quite big. Can anyone help me with suggesting the ways how this can be done quite simpler.


Cheers,
Richard
Amit Vinod Dali
Ranch Hand

Joined: Apr 14, 2010
Posts: 42
Creating jar files
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14074
    
  16

The standard Java library contains classes in the package java.util.jar to work with JAR files (see what's in a JAR file, read the contents, create JAR files etc.). See the API documentation of that package for more info.


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
renu richard
Ranch Hand

Joined: Oct 06, 2008
Posts: 116
what i basically do is,

1) i would need to extarct the jar,
2) Update a certain file in that extracted folder
3) Again Jar the folder passing the name.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Jar/Unjar using JAVA
 
Similar Threads
Jar File Security
How To Unjar a JAR File
Jar a folder using Java
Problem in wrtitng JAR File
E-mail implementation through maven