• Post Reply Bookmark Topic Watch Topic
  • New Topic

modifying an existing jar file using ant  RSS feed

 
gaurav abbi
Ranch Hand
Posts: 108
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
can we modify an existing jar file with ant.
is there any ant task available for this.
modifications is like adding a class file to a jar.
 
karthikeyan Chockalingam
Ranch Hand
Posts: 259
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can again create the jar file. It will override the existing jar file with the new class added.

I have not tried this but there is an update attribute in the jar task
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, the update attribute should do the trick. Keep in mind that it can be quite slow with big jar files.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!