db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bryan Pendleton <bpendle...@amberpoint.com>
Subject Re: Adding a class to a jar file programatically
Date Wed, 30 Nov 2005 01:18:11 GMT
David W. Van Couvering wrote:
> My Google efforts have shown me how to read a jar file, how to create 
> and write a new jar file.  I want to add a new entry to an existing jar 
> file programatically.  Anybody know how to do this?

Well, jar files are just ZIPs, so you can work with ZipOutputStream
and ZipEntry:
http://java.sun.com/j2se/1.4.2/docs/api/java/util/zip/ZipOutputStream.html
http://java.sun.com/j2se/1.4.2/docs/api/java/util/zip/ZipEntry.html

bryan


Mime
View raw message