There are several good books about the Java virtual machine including:

If you're doing anything with the virtual machine, or if you just want to know what's going on behind the scenes, then you need this book.

This book is a comprehensive programming guide for the Java Virtual Machine (JVM). The book is divided into two sections: the first section includes information on the semantics and structure of the JVM; the second section is a reference of the JVM instructions, or "opcodes." This book is intended to give readers a strong overview and reference of the JVM so that they may create their own implementations of the JVM, or write their own compilers that create Java object code. The programming guide includes numerous examples written in Java assembly language. A Java assembler is provided with the book, so the examples can all be compiled and executed. The reference section is a complete description of the instruction set of the VM and the class file format, including a description of the byte-code verifier.
Furthermore my own book, Java Secrets has substantial discussion of the virtual machine.