This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
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

Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
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: 39547
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 ]

Ping & DNS - updated with new look and Ping home screen widget
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: 39547
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
Similar Threads
Which part of Java is sexy for you?
Taglib file outside WEB-INF
invalid CEN header (bad signature)
error in servlet