Modifying code in jars (attaching detaching sources)

Hello,
I have a third part open source jar I am using.
I use intellij. When I wanted to go to to the internals it asked me to import the sources. I downloaded the java files from the third party and imported. Now I can go into the code and modify it.
BUT when I change stuff it doesnt respond to those changes because it probably goes by the jar compiled sources.
How can I modify stuff inside the jar?

Thanks.

3 comments
Comment actions Permalink

You need to set up a project for the jar file, compile your modified sources and build an updated version of the jar file from them.

0
Comment actions Permalink

exactly what I did. Then replaced the original jar and still it doesnt get it

actually what i did. is copied the jar to separate directory. renamed it to zip. unzipped. then replaced the copiled class files I need and zipped it back and renamed back to jar.

0
Comment actions Permalink

Can any one answer the question? Why when I replace the jar and reattach sources I see the old code even after I deleted the project files?

0

Please sign in to leave a comment.