I am trying to use objectweb ASM to read the bytecodes of a method in a class, for example java.lang.Integer
. I tried following this example online but even a simple snippet generates an error.
Code Snippet
try {
new ClassReader("java.lang.Integer");
} catch (IOException e) {
throw new RuntimeException(e);
}
Error was java.lang.RuntimeException: java.io.IOException: Class not found
.
Any help is appreciated.
References
https://www.baeldung.com/java-asm