The JDK comes with 爪哇 which is a tool to disassemble the byte code inside a class file. Editing on byte code level is possible. Have a look at BCEL, a java library designed to read, manipulate and write class files.
Just be careful that editing bytecode in not as straightforward as you think. The JVMS imposes many restrictions on how class files should be, and there is a great chance that one of your edit will violate one of them.