unpack war to a directory using jar command.is that possible?
I've search online a way to unpack a war file from a location to a different one, and so far nothing satisfactory. i use this command
jar -xvf开发者_如何学编程 mysite.war -C /usr/local/tomcat/webapps/mysite/
it's not working.this :
jar -xvf mysite.war /usr/local/tomcat/webapps/mysite/
is not throwing any error but still not working any idea?
Found the blog post at mkyong.com
As stated there: "...jar does doesn’t has option to extract files to another folder directly..." So what you need to do is change to the directory you want to extract to, and then refer the jar-file from there
mkdir newdir
cd newdir
jar -xvf /workspace/test/classes/test.jar
This will do the trick for you on Windows as well, since unzip is not available there by default.
A war
file is a zipped archive. Perhaps using unzip
will work.
精彩评论