Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2790527
  • 博文数量: 471
  • 博客积分: 7081
  • 博客等级: 少将
  • 技术积分: 5369
  • 用 户 组: 普通用户
  • 注册时间: 2012-01-04 21:55
文章分类

全部博文(471)

文章存档

2014年(90)

2013年(69)

2012年(312)

分类: Java

2012-05-26 22:24:47

   那是Jar自动生成的,存放着说明性的信息

用法: jar {ctxui}[vfm0Me] [jar-file] [manifest-file] [entry-point] [-C dir] file
s ...
选项包括:
  -c 创建新的归档文件
  -t 列出归档目录
  -x 解压缩已归档的指定(或所有)文件
  -u 更新现有的归档文件
  -v 在标准输出中生成详细输出
  -f 指定归档文件名
  -m 包含指定清单文件中的清单信息
  -e 为捆绑到可执行 jar 文件的独立应用程序
  指定应用程序入口点
  -0 仅存储;不使用任何 ZIP 压缩
  -M 不创建条目的清单文件
  -i 为指定的 jar 文件生成索引信息
  -C 更改为指定的目录并包含其中的文件
如果有任何目录文件,则对其进行递归处理。
清单文件名、归档文件名和入口点名的指定顺序
与 "m"、"f" 和 "e" 标志的指定顺序相同。 

将 foo/ 目录中的所有文件归档到 "classes.jar" 中:

  jar cvfm classes.jar mymanifest -C foo/ .



G:\Users\king\eclipsespace\scjp\bin\sun\scjp>jar cvf classes/chaper7.jar -C chap
er7/ .
标明清单(manifest)
增加:chaper7/./(读入= 0) (写出= 0)(存储了 0%)
增加:chaper7/./Animal.class(读入= 302) (写出= 229)(压缩了 24%)
增加:chaper7/./Bike.class(读入= 616) (写出= 350)(压缩了 43%)
增加:chaper7/./Bird.class(读入= 974) (写出= 529)(压缩了 45%)
增加:chaper7/./Car.class(读入= 614) (写出= 348)(压缩了 43%)
增加:chaper7/./Cat.class(读入= 971) (写出= 522)(压缩了 46%)
增加:chaper7/./Dog.class(读入= 971) (写出= 521)(压缩了 46%)
增加:chaper7/./Person.class(读入= 1281) (写出= 642)(压缩了 49%)
增加:chaper7/./RentalGeneric.class(读入= 1111) (写出= 564)(压缩了 49%)
增加:chaper7/./TestArraysort.class(读入= 1481) (写出= 852)(压缩了 42%)
增加:chaper7/./TestGeneric.class(读入= 1585) (写出= 804)(压缩了 49%)
增加:chaper7/./TestParameter.class(读入= 2798) (写出= 1371)(压缩了 51%)

G:\Users\king\eclipsespace\scjp\bin\sun\scjp>jar cvf classes/chaperTest.jar -C c
haper7/ TestArraysort.class(注意TestArraysort.class前有个空格,最后才发现)
标明清单(manifest)
增加:chaper7/TestArraysort.class(读入= 1481) (写出= 852)(压缩了 42%)

G:\Users\king\eclipsespace\scjp\bin\sun\scjp>
阅读(703) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~