war文件

作为java或准确一点的J2EE的部署来说,没有人对war文件有任何的怀疑的,因为这是司空见惯的事情。加上tomcat的部署默认要求又不是很严格,所以一直对war文件的解压或压缩感到陌生。这可不,今天就遇到一个解压.war后缀的文件,google了一把,才知道它是个zip文件。
感谢论坛的朋友作如下的回答:
It is a special jar file.

A jar file is a special zip file.

So jar or unzip will do.

其他的我也不去深度的挖掘了,在这里列出jar --help的内容,他本身和zip的功能没多少区别,但是它可以将java的字节码文件打包,并执行。
lee@lee-laptop:~/tmp/middsoftware/pluto-1.1.3/webapps$ jar --help
Usage: jar {ctxuV}[vfm0ME@] [jar-file] [manifest-file] [-C dir] files ...

Store many files together in a single `jar' file.

-c create new archive
-t list table of contents for archive
-x extract named (or all) files from archive
-u update existing archive

-@ read names from stdin
-0 store only; use no ZIP compression
-C DIR FILE change to the specified directory and include
the following file
-E don't include the files found in a directory
-f FILE specify archive file name
--help print this help, then exit
-m FILE include manifest information from specified manifest file
-M Do not create a manifest file for the entries
-i generate an index of the packages in this jar
and its Class-Path (currently unimplemented)
-v generate verbose output on standard output
-V, --version display version information

If any file is a directory then it is processed recursively.
The manifest file name and the archive file name needs to be specified
in the same order the 'm' and 'f' flags are specified.

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/ .
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值