title: Changing the code of the class from jar file
body: <p>How can I read (load) the java class from jar file, add some code to the class and then put back to the jar?
  I need to write a script (a java code) which does all these things. Steps I think of are:
  1. Read the jar and get the entry with the name of class by using methods from java.util.jar package
  2. Load this class, get the array from the class, change it
  3. Maybe compile the code to apply the changes
  4. Put the renewed class to the jar file</p>
  
  <p>I dont know how to do 2nd and 3rd steps in java. </p>
  
  <p>I was thinking to write new java class which extends this class and change the array, but this array is declared as public static final, thats why I cannot change it. Or I am wrong and there is a way of changing the array by extending the class? </p>