wood burning stoves 2.0*
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


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
 
GeeCON Prague 2014
 
subject: Jar command