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
  • 2
  • 5
  • 17

3 Answers3

1

Maybe this could help you?

Community
  • 1
  • 1
weekens
  • 7,784
  • 6
  • 42
  • 59
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
  • 299,921
  • 44
  • 364
  • 552
  • 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
  • 71,889
  • 31
  • 184
  • 335