java 的jar命令使用

简介:
Illegal option: -
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
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/ .

使用:jar -vuf /data/aa.war  aaa/

相关文章
|
1月前
|
Java jenkins 持续交付
Java项目jar包启动脚本,适用jenkins或定时任务或手动执行
Java项目jar包启动脚本,适用jenkins或定时任务或手动执行
132 3
|
25天前
|
druid Java Maven
杨校老师课堂之java_关于如何下载jar包的教程
杨校老师课堂之java_关于如何下载jar包的教程
43 0
|
25天前
|
Java 数据库 数据安全/隐私保护
Java操作Excel文件导入导出【内含有 jxl.jar 】
Java操作Excel文件导入导出【内含有 jxl.jar 】
28 0
|
21天前
|
Java Linux
Java执行Linux命令
Java执行Linux命令
25 2
|
1月前
|
IDE Java 编译器
Java基础20-从IDE的实现原理聊起,谈谈那些年我们用过的Java命令(二)
Java基础20-从IDE的实现原理聊起,谈谈那些年我们用过的Java命令(二)
31 2
|
1月前
|
XML IDE Java
Java基础20-从IDE的实现原理聊起,谈谈那些年我们用过的Java命令(一)
Java基础20-从IDE的实现原理聊起,谈谈那些年我们用过的Java命令(一)
24 2
|
11天前
|
存储 Java
Redis08命令-Hash类型,也叫散列,其中value是一个无序字典,类似于java的HashMap结构,Hash结构可以将对象中的每个字段独立存储,可以针对每字段做CRUD
Redis08命令-Hash类型,也叫散列,其中value是一个无序字典,类似于java的HashMap结构,Hash结构可以将对象中的每个字段独立存储,可以针对每字段做CRUD
|
1月前
|
Ubuntu Java Linux
Linux必备基础命令,JAVA程序员必备
Linux必备基础命令,JAVA程序员必备
|
19天前
|
Java Maven
java运行jar包提示 “XXX中没有主清单属性”,配置maven插件
java运行jar包提示 “XXX中没有主清单属性”,配置maven插件
20 0
|
25天前
|
Java 数据库连接 Spring
杨校老师课堂之Java EE框架SSM所需jar包下载
杨校老师课堂之Java EE框架SSM所需jar包下载
23 0