Get the tools you need to learn Java skills fast!
Video tutorials, eBooks, hands-on lab exercises, sample code.
Get started
The moose likes Beginning Java and the fly likes Jar command Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Software Craftsman this week in the Agile forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Jar command " Watch "Jar command " New topic
Author

Jar command

Edward Chen
Ranch Hand

Joined: Dec 23, 2003
Posts: 798
I want to extract a war file into a specific folder, which option I should use ?

This doesn't work : jar xvf my.war -d newFolder

Thanks.
Freddy Wong
Ranch Hand

Joined: Sep 11, 2006
Posts: 959

JAR command doesn't have -d option. You may want to use another command, such as unzip, e.g.



If you insist of using a JAR command, what you can do is to create a shell script that create a directory and move the jar file into that directory and do the extraction from there.

Hope it helps.


SCJP 5.0, SCWCD 1.4, SCBCD 1.3, SCDJWS 1.4
My Blog
 
Have you tried LearnNowOnline? http://www.learnnowonline.com/
 
subject: Jar command