static final int BUFFER = 2048;  public void getZip(String url[]) throws FileNotFoundException { 
try { 
BufferedInputStream origin = null; 
FileOutputStream dest = new FileOutputStream("d:/OA/oa_jsp/oa/upload/gwgl/myfile.zip"); 
ZipOutputStream zipout = new ZipOutputStream(new BufferedOutputStream(dest)); 
byte data[] = new byte[BUFFER]; 
System.out.println("正在压缩文件...");
File file = new File("D:/OA/oa_jsp/");
for (int i = 0; i < url.length; i++) { 
FileInputStream fi = new FileInputStream(url[i]); 
origin = new BufferedInputStream(fi, BUFFER); 
ZipEntry entry = new ZipEntry(url[i]); 
zipout.putNextEntry(entry); 
int count; 
while ((count = origin.read(data, 0, BUFFER)) != -1) { 
zipout.write(data, 0, count); 

origin.close(); 

zipout.close(); 
} catch (Exception e) { 
e.printStackTrace(); 
}
finally
{
System.out.println("压缩完成...");
}

url[i]是传过来的文件名数组{D:/OA/oa_jsp/oa/upload/gwgl/szxiax20091231018165920.pdf,D:/OA/oa_jsp/oa/upload/gwgl/szxiax2009123101468030.pdf}压缩后zip的文件打开是按上面的路径建了很多的文件夹(D:/OA/oa_jsp/oa/upload/gwgl),  我想直接显示文件就可以了  不要前面的文件夹麻烦大家帮我解决下 送出所有的分数 谢谢了!