1 Reply Latest reply on Jan 29, 2008 12:52 PM by Dennis Tölzer

    Modifying Bytecode inside of Jars

    Dennis Tölzer Newbie

      Hi, i got a simple question.

      I have set the classpool to a jar file and obtained a CtClass Object from it. I changed the bytecode of this class. Now how do i write it back into the jar file?

      When i use class.writeFile() without parameters it's not saved inside the jar. When i give a new location as parameter the modified classfile is saved correct to that place.

      But how do i overwrite the original classfile iside the jar?