The invention relates to a method for realizing dynamic update of
Java program in the computer technical field, which comprises the following steps: firstly, modifying the class definitions that need dynamic update in the passive dynamic update program, and adding update support method for realizing judgment to the subobjects of the class objects one by one, wherein the parameter is class
loader; secondly, modifying the update class definitions in the dynamic update program, and adding update method for realizing initialization to the variables under the update class objects, wherein, the input parameter is class
loader and old object; thirdly, modifying part of the method invocation,
data field memory, and object set of the updated program with the
Java reflection to realize running
recovery of the program; finally, adding update support method to the main class and adding update checkpoint in the main method circulation. The invention has the advantages of avoiding
software update that needs halt, update and
reboot and avoiding loss caused by halt.