0

I am trying to replace a modified property.jar in WAS.jar, what's the quickest way to do this? Replacing normal files back to a jar is very easily by using input/output stream. How can I do it with jar/ear types?

Please advise, thanks

Tom
  • 369
  • 3
  • 5
  • 17

3 Answers3

1

Maybe this could help you?

Community
  • 1
  • 1
weekens
  • 8,064
  • 6
  • 45
  • 62
0

Three steps:

  1. Unpack the JAR you want to change
  2. Make your changes
  3. Re-JAR it

I'm not saying that this is a good idea. I don't see why you should have to do such a thing. Don't consider supplying the steps as an endorsement.

duffymo
  • 305,152
  • 44
  • 369
  • 561
  • re-jar is bad idea because you will need to use all classpath and manifest etc. again – Tom Apr 26 '11 at 15:48
0

jar and ear files are zip-files. What you need to do is equivalent to replacing an entry in a zip-file.

Thorbjørn Ravn Andersen
  • 73,784
  • 33
  • 194
  • 347