作为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/ .
分享到:
相关推荐
flex在tomcat下的三个war文件 flex.war,admin.war,simple.war~!~~!
文件上传下载 struts2 多文件上传例子,是war文件,在eclipse里面导入war文件就ok了
一个例子,已经打包为WAR文件,内涵DDL文件
02_图书管理系统 (war文件).rar 02_图书管理系统 (war文件).rar 02_图书管理系统 (war文件).rar 02_图书管理系统 (war文件).rar
用eclipse导出.war文件 是有图例法显示的,简单易学易用,希望能帮助刚刚入行的菜鸟们
例子war文件,包括源码
详细的描述怎样配置tomcat和使用tomcat部署war文件。
在使用myeclipse10导出war包时报“SECURITY ALERT: INTEGERITY CHECK ERROR”错误,原因是破解不完全。对于这种错误我给大家提供一个解决方案,希望对大家能有所帮助,将...
hystrix-dashboard 1.5.12, war文件,可直接部署使用。
sw.war 文件
怎样制作ear,war文件?提供两种方法
MyEclipse 10.7.1破解并解决导出war文件时无法通过验证问题 对Myeclipse 10.* 有效。对myeclipse bling; myeclipse blue……均有效。 我自己用Windows 8 安装Myeclipse bling版本后还升级了其中的myeclipse blue...
待办事项的war文件,直接加载文件后即可生成待办事项war文件包。
unwar.jar(解压war文件所需要的包)
struts-template.war文件,用tomcat发布。
https://github.com/Activiti/Activiti/releases/download/activiti-5.18.0/activiti-5.18.0.zip中的,war文件activiti-explorer
weblogic的web项目war文件部署.docxweblogic的web项目war文件部署.docx
Java中Ear、Jar、War文件之间有何不同
GP2S用WAR文件。内部有很多的SRC文件的。
补充jbpm的war文件(与jbpm的jar一起,见上一个)