File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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 REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Question regarding a JAR" Watch "Question regarding a JAR" New topic

Question regarding a JAR

Melinda Savoy
Ranch Hand

Joined: Jun 21, 2005
Posts: 387

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

In in the src file called 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 and then put it back into the jar.

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

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

Joined: Oct 13, 2005
Posts: 45287
There is quite a lot about jars in this section of the Java™ Tutorials.
I agree. Here's the link:
subject: Question regarding a JAR
jQuery in Action, 3rd edition