String paths[]={"file:...","file:..."}; ... import javax.microedition.io.*; import java.io.*; class Pak{ public static void pack(String paths[]){ try{ int c=0; OutputStream os=((FileConnection)Connector.open("file:...")).openOutputStream(); for(int i=0;i