将war文件解压到指定目录

将war文件解压到指定目录

问:如何将.war文件解压到指定目录?

答:jar命令没有这样的选项.

eg:将abc.war解压到当前文件夹?

答:进入目标文件即abc.war文件所在的文件夹,按住shift键并在该文件夹空白处点击鼠标右键,选择”在此处打开命令窗口(W)”,调出命令窗口,键入命令:jar xvf abc.war,按回车键即可完成解压.(解压后文件夹内会比较乱,尽量将.war文件解压后的各文件整理到.war同名空文件夹下)

将war文件解压到指定目录

补充:
Usage: jar {ctxui}[vfm0Me] [jar-file] [manifest-file] [entry-point] [-C dir] files …
Options:
    -c  create new archive
    -t  list table of contents for archive
    -x  extract named (or all) files from archive
    -u  update existing archive
    -v  generate verbose output on standard output
    -f  specify archive file name
    -m  include manifest information from specified manifest file
    -e  specify application entry point for stand-alone application 
        bundled into an executable jar file
    -0  store only; use no ZIP compression
    -M  do not create a manifest file for the entries
    -i  generate index information for the specified jar files
    -C  change to the specified directory and include the following file

  将war文件解压到指定目录

If any file is a directory then it is processed recursively.
The manifest file name, the archive file name and the entry point name are
specified in the same order as the ‘m’, ‘f’ and ‘e’ flags.

Example 1: to archive two class files into an archive called classes.jar: 
       jar cvf classes.jar Foo.class Bar.class 
Example 2: use an existing manifest file ‘mymanifest’ and archive all the
           files in the foo/ directory into ‘classes.jar’: 
       jar cvfm classes.jar mymanifest -C foo/ .

 

总结:dos命令 jar xvf abc.war

 

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请联系我们举报,一经查实,本站将立刻删除。

发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/108979.html原文链接:https://javaforall.net

(0)
全栈程序员-站长的头像全栈程序员-站长


相关推荐

  • ViewPager复用

    ViewPager复用代码很简单,记录一下importandroid.support.v4.view.PagerAdapter;importandroid.support.v4.view.ViewPager;importandroid.support.v7.app.AppCompatActivity;importandroid.os.Bundle;importandroid.view.View;…

    2022年7月22日
    11
  • 作为一个程序员,什么是脚本。必须要理解「建议收藏」

    作为一个程序员,什么是脚本。必须要理解「建议收藏」Javascript是一门动态类型、面向对象的脚本语言。对脚本进行一个感性的认识。就是一个跟计算机执行的文本。理解脚本如果你打开一本JavaScript教程,那么很可能在第一章就看到这句话

    2022年8月2日
    5
  • Lucene分词报错:”TokenStream contract violation: close() call missing”

    Lucene分词报错:”TokenStream contract violation: close() call missing”Lucene使用IKAnalyzer分词时报错:”TokenStreamcontractviolation:close()callmissing”解决办法是每次完成后必须调用关闭方法。如果报错:java.lang.illegalstateexception:tokenstreamcontractviolation:reset()/close()callmissing,…

    2022年7月22日
    17
  • java 遍历map 方法[通俗易懂]

    遍历方法一( entrySet()遍历):Iteratorit=tempMap.entrySet().iterator();while(it.hasNext()){Map.Entryentry=(Map.Entry)it.next();Objectkey=entry.getKey();Objectvalue=entry.getVal

    2022年4月15日
    60
  • WaitForSingleObject_调用wait方法时,线程会放弃对象锁

    WaitForSingleObject_调用wait方法时,线程会放弃对象锁摘要在MicrosoftWindows平台上有几种以原子方式锁定代码和数据的不同方法。此白皮书的主要目的是向开发人员简要介绍Windows中进行锁定的不同方法以及与这些锁定有关的相应性能开销。因为未来架构将是多核架构,因此此信息非常适用。简介多线程软件应用对于提升英特尔内核架构的性能至关重要。锁定代码通常是多线程应用中运行最频繁的代码。确定要使用的锁定方法与确定应用中并行处理

    2022年9月20日
    2
  • currentstyle 织梦_dede currentstyle属性完美解决方案

    问题一、dede让channelartlist标签支持currentstyle属性完美解决打开include\taglib\channelartlist.lib.php找到$pv->Fields[‘typeurl’]=GetOneTypeUrlA($typeids[$i]);在此行代码下方增加以下代码:if($typeids[$i][‘id’]==$refObj->TypeL…

    2022年4月18日
    312

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

关注全栈程序员社区公众号