Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Ramakrishnan Ramaswamy
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
or there is an easier way
re name .jar to .zip and unzip it
 
Roseanne Zhang
Ranch Hand
Posts: 1953
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Winzip utility can read .jar file without renaming. Just open the jar file, extract.
 
Frank Carver
Sheriff
Posts: 6920
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic