jclasslib bytecode editor is a tool that visualizes all aspects of compiled Java class files and the contained bytecode.
You might be able to use a tool like https://github.com/ingokegel/jclasslib that allows some editing. I've never used it and have no idea whether it will support what you need to achieve in terms of editing or what range of class-formats it supports.
Debugger for Java Bytecode
2 projects | reddit.com/r/java | 17 Aug 2021
Building a simple Log4Shell detector with ProGuardCORE
1 project | reddit.com/r/Compilers | 3 Feb 2022
Is there any books or guides on how to target JVM bytecode?
2 projects | reddit.com/r/Compilers | 30 Jan 2022
Concise language to write an interpreter for?
3 projects | reddit.com/r/ProgrammingLanguages | 28 Jan 2022
What is your take on the current state of JavaFX as a GUI library?
2 projects | reddit.com/r/JavaFX | 11 Dec 2021