jad反编译代码
jad --source-only com.andyxh.HelloService > /tmp/HelloService.java
修改代码
vim com.andyxh.HelloService
查找 ClassLoader
$ sc -d com.andyxh.HelloService | grep classLoaderHash
classLoaderHash 4f8e5cde
mc内存编译源代码
$ mc -c 4f8e5cde /tmp/HelloService.java -d /tmp
Memory compiler output:
/tmp/com/andyxh/HelloService.class
Affect(row-cnt:1) cost in 463 ms.
redefine热更新代码
$ redefine /tmp/com/andyxh/HelloService.class
redefine success, size: 1