![]() | Documentation Contents |
pack200 [ options ] output-file JAR-file??????????????????????????????????????????????????????????????????????????????????????? properties ????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
options- ?????????????????????????????????
output-file- ??????????????????????????????
JAR-file- ??????????????????????????????
pack200???????????????Javagzip???????????????????????????????????????JAR ???????????????pack200????????????????????????????????? Java ?????????????????????????????????pack200????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
pack200???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????:
% pack200 myarchive.pack.gz myarchive.jar????????????????????????????????????
pack200????????????myarchive.pack.gz????????????????????????
-r --repack
myarchive.jar???????????????????????????????????????????????????????????????????????????JAR ??????????????????????????????????????????????????????????????????jarsigner(1)????????????????????????????????????????????????????????????
% pack200 --repack myarchive-packer.jar myarchive.jar
% pack200 --repack myarchive.jar
-g --no-gzip
pack200???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? ?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
% pack200 --no-gzip myarchive.pack myarchive.jar
-G --strip-debug???????????????????????????????????????????????????????????????????????????????????????
SourceFile???LineNumberTable???LocalVariableTable????????????LocalVariableTypeTable?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
-O --no-keep-file-order???????????????????????????????????????????????????????????????????????????????????????JAR ???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? JAR ???????????????????????????????????????????????????????????????????????????????????????
-Svalue --segment-limit=value????????????????????????????????????????????????????????????????????????????????? N (???????????????) ?????????N ?????????????????????????????????????????????????????????????????????
??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????-1???????????????????????????????????????????????????????????????????????????????????????????????????????????? ???????????????0???????????????????????????????????????????????? 1 ????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
??????????????????????????????
1000000(100 ????????????) ????????????????????????????????????????????? JAR ???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? 10M ???????????? JAR ??????????????????????????????????????? 10% ????????????????????????????????????????????? ???????????????????????????????????????????????? Java ????????? (?????????????????????????????? 10 ???) ??????????????????????????????????????????
-Evalue --effort=value????????? 10 ?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
1??????????????????????????????????????????????????????????????????????????????????????? ?????????9????????????????????????????????????????????????????????????????????????????????????0????????????????????????????????? JAR ?????????????????????????????????????????????????????????JSR 200 ???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
5????????? ???????????????????????????????????????????????????????????????????????????
-Hvalue --deflate-hint=value????????????????????????????????????????????????????????????????????? ?????????????????????????????????????????????????????????????????????????????????:
truefalse- ??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? ???????????????????????????????????????????????????????????????????????????????????????
keep- ?????? JAR ?????????????????????????????????????????????????????? (???????????????)???
-mvalue --modification-time=value????????????:
latest- ???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
keep- ?????? JAR ???????????????????????????????????? (???????????????)???
-Pfile --pass-file=file????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? ????????????????????????????????????????????? JAR ?????????????????????????????????
/???????????????????????????????????????????????????????????????JAR ????????????????????????????????????????????????????????????????????????????????????file ??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
-Uaction --unknown-attribute=action???????????????????????????????????????????????? ?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????:
errorpack200???????????????????????????????????????????????????????????????strip- ???????????????????????????????????????: VM ??????????????????????????????????????????????????????????????????????????????????????????????????????
pass- ????????????????????????????????????????????????????????? 1 ????????????????????????????????????????????????
-Cattribute-name=layout --class-attribute=attribute-name=action
-Fattribute-name=layout --field-attribute=attribute-name=action
-Mattribute-name=layout --method-attribute=attribute-name=action
-Dattribute-name=layout --code-attribute=attribute-name=action????????? 4 ??????????????????????????????????????????????????????????????? Class ?????????Field ?????????Method ?????????Code ???????????????????????????????????????????????????????????????attribute-name ?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????:
(?????????????????????????????????)- ???????????????????????????JSR 200 ????????????????????????????????????
???:
--class-attribute=SourceFile=RUHerror- ???????????????????????????????????????pack200 ???????????????????????????????????????????????????????????????
strip- ????????????????????????????????????????????????????????????????????????????????????: VM ??????????????????????????????????????????????????????????????????????????????????????????????????????
???:
--class-attribute=CompilationID=pass???????????????????????????????????????????????????????????????????????? ????????????????????????????????????????????????????????????????????????
-f pack.properties --config-file=pack.properties?????????????????????????????????????????????????????????????????? Java ?????????????????????????????????????????????????????????????????????????????????
% pack200 -f pack.properties myarchive.pack.gz myarchive.jar
% more pack.properties
# Generic properties for the packer.
modification.time=latest
deflate.hint=false
keep.file.order=false
# This option will cause the files bearing new attributes to
# be reported as an error rather than passed uncompressed.
unknown.attribute=error
# Change the segment limit to be unlimited.
segment.limit=-1
-v --verbose???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
-q --quiet???????????????????????????????????????????????????
-lfilename --log-file=filename???????????????????????????????????????????????????????????????
-Joption
pack200?????????????????????????????? Java ??????????????????????????????????????????????????????????????????-J-Xms48m????????????????????????????????????????????????????????? 48M ?????????????????????????????????????????????????????????-X?????????????????????????????????pack200????????????????????????????????????????????????-J???????????????Java ?????????????????????????????????????????????????????????????????? VM ??????????????????????????????????????????????????????????????????
????????????????????????????????????
0"??????"
>0"?????????"
jar - Java Archive ????????????jarsigner - JAR ?????????????????????????????????attributes(5) ????????????????????????????????????????????????
pack(1)??????????????????????????????????????????????????????????????????SDK ??????????????? Java SE API ???????????????????????????????????????????????????????????????????????????????????????
Copyright © 1995-2010 Sun Microsystems, Inc. All Rights Reserved. Please send comments using this Feedback page. |
Java Technology |