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/

相关文章
|
25天前
|
Java jenkins 持续交付
Java项目jar包启动脚本,适用jenkins或定时任务或手动执行
Java项目jar包启动脚本,适用jenkins或定时任务或手动执行
79 3
|
10天前
|
druid Java Maven
杨校老师课堂之java_关于如何下载jar包的教程
杨校老师课堂之java_关于如何下载jar包的教程
26 0
|
10天前
|
Java 数据库 数据安全/隐私保护
Java操作Excel文件导入导出【内含有 jxl.jar 】
Java操作Excel文件导入导出【内含有 jxl.jar 】
22 0
|
6天前
|
Java Linux
Java执行Linux命令
Java执行Linux命令
18 2
|
17天前
|
IDE Java 编译器
Java基础20-从IDE的实现原理聊起,谈谈那些年我们用过的Java命令(二)
Java基础20-从IDE的实现原理聊起,谈谈那些年我们用过的Java命令(二)
25 2
|
17天前
|
XML IDE Java
Java基础20-从IDE的实现原理聊起,谈谈那些年我们用过的Java命令(一)
Java基础20-从IDE的实现原理聊起,谈谈那些年我们用过的Java命令(一)
20 2
|
25天前
|
Ubuntu Java Linux
Linux必备基础命令,JAVA程序员必备
Linux必备基础命令,JAVA程序员必备
|
4天前
|
Java Maven
java运行jar包提示 “XXX中没有主清单属性”,配置maven插件
java运行jar包提示 “XXX中没有主清单属性”,配置maven插件
8 0
|
10天前
|
Java 数据库连接 Spring
杨校老师课堂之Java EE框架SSM所需jar包下载
杨校老师课堂之Java EE框架SSM所需jar包下载
17 0
|
18天前
|
IDE 数据可视化 Java
Java基础6-Java文件和Java包结构和常用的jar包(二)
Java基础6-Java文件和Java包结构和常用的jar包(二)
20 0