• Post Reply Bookmark Topic Watch Topic
  • New Topic

How can I modify a .class file inside a .jar?  RSS feed

 
Winston Liek
Ranch Hand
Posts: 194
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have to modify my ContainerImpl.java inside a .jar file. My modification is in here: https://fisheye6.atlassian.com/changelog/struts2?cs=1304070 but I do not know how can I modify it
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can use the "u" option of the jar tool to update parts of an existing jar file: http://docs.oracle.com/javase/7/docs/technotes/tools/windows/jar.html
 
Joe Harry
Ranch Hand
Posts: 10128
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you mean modifying a .class file? Normally a .java file inside a jar is pointless unless you want to ship your source together with the bytecode which is definitely not recommended. If this is just a one off, you can use WinRAR to open your .jar and easily swap your .class files.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!