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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With