使用 jar 命令将 war 解压到一个目录。这可能吗?
我在网上搜索了一种将 war 文件从一个位置解压到另一个位置的方法,但到目前为止还没有令人满意的结果。 我使用这个命令
jar -xvf mysite.war -C /usr/local/tomcat/webapps/mysite/
它不起作用。this:
jar -xvf mysite.war /usr/local/tomcat/webapps/mysite/
没有抛出任何错误但仍然不起作用任何想法?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
在 mkyong.com 上找到了 博客文章
如所述: “...jar 确实没有选项直接将文件提取到另一个文件夹...” 因此,您需要做的是更改为要提取到的目录,然后引用 jar 文件 这在
Windows 上也能解决问题,因为默认情况下解压缩在那里不可用。
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
This will do the trick for you on Windows as well, since unzip is not available there by default.
war
文件是一个压缩存档。也许使用unzip
会起作用。A
war
file is a zipped archive. Perhaps usingunzip
will work.