aspose file tools*
The moose likes Java in General and the fly likes Unjar.........????? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Unjar.........?????" Watch "Unjar.........?????" New topic
Author

Unjar.........?????

Ramakrishnan Ramaswamy
Greenhorn

Joined: Mar 02, 2001
Posts: 2
Hello
Is there any way to xtract the files in ajar file .Like i have a jar file having a number of class files in it .Now how do i get the class files out .Is there any way to do this in jdk or do i have to get any seperste software for it.???
ali farid
Ranch Hand

Joined: Aug 26, 2000
Posts: 60
you can use this command
jar -xvf <filename>
e.g.
jar -xvf src.jar
for help on jar command type jar -help
ali farid
Ranch Hand

Joined: Aug 26, 2000
Posts: 60
or there is an easier way
re name .jar to .zip and unzip it
Roseanne Zhang
Ranch Hand

Joined: Nov 14, 2000
Posts: 1953
Winzip utility can read .jar file without renaming. Just open the jar file, extract.
Frank Carver
Sheriff

Joined: Jan 07, 1999
Posts: 6920
I think the renaming was suggested because recent Java SDK installations map the "open" operation of Jar files to run the jar, so just clicking on the jar file will probably not do anything useful.
The long-term solution is to add an action to the Jar file type which opens it using winzip. I have done this, and it works well. I can just right-click on a jar file and select "unzip" and it opens in WinZip for me.


Read about me at frankcarver.me ~ Raspberry Alpha Omega ~ Frank's Punchbarrel Blog
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Unjar.........?????
 
Similar Threads
How to include third party jar files with in manifest file.
custom tag
Jar Question
why does javac create 2 class files
When to declare mapping resources in hibernate configuration files