Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How do you Unzip a JAR file

 
Zahid, Butt
Ranch Hand
Posts: 100
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All
How do you unzip a Jar file ???
Do you require specific softwar. Simply double clicking does not
work.
I want to unzip the src.jar file which is part of the JDK.
Thanks in advance.
 
Bruce Wingate
Ranch Hand
Posts: 32
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I use WinZip, but PKZip or gunzip should work fine. You might need to play with the extensions for gunzip.
 
Bosun Bello
Ranch Hand
Posts: 1510
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you have the JDK installed, do the following at the DOS prompt.
jar xvf yourjarfile.jar
You can also try winzip.
Bosun
 
Zahid, Butt
Ranch Hand
Posts: 100
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
Bosun, your command is not recognised in the dos prompt.
I am running this command in the directory the file is in.
Any other suggestions ???
Thanks in advace.
 
John M. Gabriele
Ranch Hand
Posts: 232
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you need to set your PATH environment variable. i'm no windows
guy, but i think how you do it depends on whether you're using
NT or 98.
PATH tells your system where to look for executables (such as
jar) when you try to run them from the command line (err,.. dos
prompt.)
 
John M. Gabriele
Ranch Hand
Posts: 232
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
whoops. i assumed you already have the java2 sdk installed.
when you install the sdk, the jar program comes with it.
 
Zahid, Butt
Ranch Hand
Posts: 100
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
I DO have the Java2 SDK installed but I am not familiar with it.
Which directory is the JAR program. How do I use it ??
Where can I find out how to set the PATH environment variable ??
Thanks in Advance.
 
Siva Prasad
Ranch Hand
Posts: 104
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Hi Zahid
If you are using windows, open a DOS window and type PATH
It will show the current PATH. Check in that list, whether your JDK1.2.2/bin directory is there or not. This is where all your java compiler and other utilities exists.
If not add this
<drive>JDK1.2.2/bin like this
for eg. if your JDK is installed under C:\JDK1.2.2
SET PATH=C:\JDK1.2.2\bin;%PATH%;
Cheers
Siva Prasad
 
Zahid, Butt
Ranch Hand
Posts: 100
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
Thanks Siva. The command worked and I now have the jar file uncompressed.
By the way is "jar xvf filename.jar" a dos command ???
If so I need to polish up my DOS commands
Thanks ALL.
 
Bosun Bello
Ranch Hand
Posts: 1510
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, "jar xvf filename.jar" is not a DOS command. It's a command used with the jar tool. I saw it in Java in a nutshell.
Bosun
 
Zahid, Butt
Ranch Hand
Posts: 100
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ALL
Thanks Bosun. Would you recommend Java in a Nutshell as a book to buy ?? What level of programmer is it written for ??
Thanks in advance.
 
Bosun Bello
Ranch Hand
Posts: 1510
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Zahid, it's a good book. You may want to check out it's reviews at Amazon or bookpool. It's the first Java book I read, I have it right at my desk at work, because it's also a good reference. It's probably best suited for someone whos is already familiar with C/C++ or some other programming language. Another book I use a lot is Ivor Horton's Beginning Java 2. Both books were also helpful with getting my certification.
Bosun
 
Cindy Glass
"The Hood"
Sheriff
Posts: 8521
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is a whole bunch of book review at the BunkHouse:
http://www.javaranch.com/books.jsp
 
Zahid, Butt
Ranch Hand
Posts: 100
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ALL
Thanks for the advice Bosun.
Thanks to All that have contributed.
Zahid.
 
Bruce Wingate
Ranch Hand
Posts: 32
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Java In a Nutshell
I haven't read this one, but in general, I found the nutshell books good, but not for learning. They work best when you have some basis in the language/topic so that you know where to start from.
Bruce.
 
Randall Twede
Ranch Hand
Posts: 4353
2
Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A great tool I found is powerarchiver it will compress/uncompress any type of compressed file(zip jar tar etc etc). you can get it free at http://powerarchiver.com/
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic