学习Java我觉得最好的教材就是Sun网站提供的Java Tutorial。这里面的教程分为不同档次,但是如果你细心研读下来要比你读那些乱七八糟的书强。当然在高级Java知识学习的过程中,不妨时时同时阅读JDK的源代码(JDK的源代码在<JDK_HOME>/src.zip中)。
Packer packer=Pack200.newPacker();
OutputStream output=new BufferedOutputStream(new FileOutputStream(outfile));
packer.pack(new JarFile(jarFile), output);
output.close();
OutputStream output=new BufferedOutputStream(new FileOutputStream(outfile));
packer.pack(new JarFile(jarFile), output);
output.close();
Unpacker unpacker=Pack200.newUnpacker();
output=new JarOutputStream(new FileOutputStream(jarFile));
unpacker.unpack(pack200File, output);
output=new JarOutputStream(new FileOutputStream(jarFile));
unpacker.unpack(pack200File, output);
output.close();
http://java.sun.com/javase/6/docs/technotes/guides/deployment/deployment-guide/pack200.html