Meaningless Drivel is fun!*
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 Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Adding files to jar" Watch "Adding files to jar" New topic
Author

Adding files to jar

Devi Hari
Greenhorn

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

Joined: Mar 22, 2005
Posts: 41173
    
  45
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 - my free Android networking tools app
john guthrie
Ranch Hand

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

Joined: Mar 22, 2005
Posts: 41173
    
  45
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.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Adding files to jar
 
Similar Threads
error in servlet
Taglib file outside WEB-INF
ClassNotFoundException
invalid CEN header (bad signature)
Which part of Java is sexy for you?