File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to Unjar a Jar File?

 
Emmanuel Bakare
Greenhorn
Posts: 19
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I need Help to un jar the SCJD Assignment.
I have read the java tutorial on this , but I still can't do it . Whenever I typed the command in the command prompt. I get a message " BAD COMMAND". I changed directory to JDK FILE , I still can't do it . I need someone to help me.
Regards,
Emmanuel Bakare.
 
Damian Ryan
Ranch Hand
Posts: 117
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There are a few ways to do it.
One way is to use the command line "jar" tool.
For example, if your JAR file is called "abc.jar", to extract its contents you would type:
jar xf abc.jar
this would then unpackage the contents of the jar into your current directory.
Note that for this to work, the "jar" executable must be in your PATH environment variable.
(On Windows, if your JDK were in "C:\j2sdk1.4.1_02", the entry "C:\j2sdk1.4.1_02\bin" should be appended to your PATH environment variable [you can do this manually from your command window by typing "SET PATH=%PATH%;C:\j2sdk1.4.1_02". On Linux/Unix, if your JDK were in /j2sdk1.4.1_02, you could append it your path (in a bash shell) by typing "EXPORT PATH=$PATH:/j2sdk1.4.1_02/bin").
Alternatively you can use WinZip on Windows, or the file-roller on Linux, or any one of a number of other graphical utilities.
Unix/Linux-philes will have more specific advice about those environments, I'm sure.
Hope this helps.
[ May 20, 2003: Message edited by: Damian Ryan ]
[ May 20, 2003: Message edited by: Damian Ryan ]
 
Emmanuel Bakare
Greenhorn
Posts: 19
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Damien for your help. I was not aware you can use winzip to unjar the file.
I have just unjar the file now.
Thanks oce again.
Regards,
Emmanuel Bakare
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic