File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes Question regarding a 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 » Beginning Java
Bookmark "Question regarding a JAR" Watch "Question regarding a JAR" New topic
Author

Question regarding a JAR

Melinda Savoy
Ranch Hand

Joined: Jun 21, 2005
Posts: 386

I have a jar called: securityFile.jar and this jar has multiple folders & files.

In in the src file called securityFile-src.zip and there is a file in that zip that I am needing to modify and put back into the securityFile.jar.

How can I accomplish this? I've googled for awhile and I see how to jar a project in Eclipse to execute but I've never had to get a file out of the securityFile-src.zip and then put it back into the jar.

Any help/direction would be appreciated. Regards.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Un-jar it, un-zip the zip, modify the file, re-zip, re-jar.

No good reason to do any of that in Eclipse if there isn't already an Ant/etc. task to do it automatically.
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38057
    
  22
There is quite a lot about jars in this section of the Java™ Tutorials.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Question regarding a JAR
 
Similar Threads
Byte array to String
When does hashCode gets Called !!
Java classes source code
How List interface work ?
Input without action listeners: JOptionPane?