Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

import java.io.FileOutputStream;
import java.io.OutputStream;
import java.util.jar.JarFile;
import java.util.jar.Pack200;

public class Main {
    public static void main(String[] args) throws Exception {
        JarFile f = new JarFile("a.jar");
        Pack200.Packer packer = Pack200.newPacker();
        OutputStream out = new FileOutputStream("a.pack");
        packer.pack(f, out);
        out.close();
    }
}