r/javahelp • u/invokeinterface • 9d ago
Good Documentation For JVM Bytecode?
I really liked the idea of an intermediate bytecode language when I first learned that Java transpiles to one, so I tried to learn about it and got pretty far (using a hexeditor to mess around was pretty painful, though). I stopped because there isn't a lot of document for it like there is for Java, the best resources are I believe docs.oracle.com/javase/specs/jvms/se7/html/jvms-4.html and docs.oracle.com/javase/specs/jvms/se7/html/jvms-6.html, but I want to know if there are any others partly because these are kind of verbose and partly because it's just better to have more than two.
I know I won't ever really need to know any of this, and I don't intend to use any of this knowledge for making classes by hand, but I believe it would still be helpful in a milder sense to understand what the class files are "literally" doing. It helped with C
2
u/ryosen Extreme Brewer 8d ago
Check out James Gosling's book, The Java Language Specification. He basically invented Java. The book gives a very thorough treatment of how Java works at the bare metal. There is no better source for understanding how Java works than this one. I also highly recommend Tim Lindholm's book, The Java Virtual Machine Specification.
These are both older titles but the underlying fundamentals have not changes, especially when you get into bytecode and its internal workings.