The JDK comes with javap 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.
A list of tool and libraries to edit byte code can be found on java-net. For example JBE, a Java Byte Code editor that even comes with a GUI.