File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java in General and the fly likes Adding files to jar Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Adding files to jar" Watch "Adding files to jar" New topic

Adding files to jar

Devi Hari

Joined: Oct 03, 2005
Posts: 7
How can i add programatically new files to a folder in jar file
Ulf Dittmer

Joined: Mar 22, 2005
Posts: 42965
Hello Devi-

On your way in you may have missed that JavaRanch has a policy on display names, and yours does not comply with it; specifically, a first name and a last name are required. Please adjust it accordingly, which you can do right here. Thanks for your prompt attention to this matter.
[ August 02, 2006: Message edited by: Ulf Dittmer ]
john guthrie
Ranch Hand

Joined: Aug 05, 2002
Posts: 124
i've not done it, but this guy seems to have
Ulf Dittmer

Joined: Mar 22, 2005
Posts: 42965
If you have access to the sources of the JDK tools, you could study the "jar" tool, which can update existing jar files. It might have some useful helper classes that augment the java.util.jar package in this regard.
I agree. Here's the link:
subject: Adding files to jar
It's not a secret anymore!