Get Under the Hood to the Java Virtual Machine

A well presented and diagrammed, sometimes intriguing look at the JVM, Java classes, security and mutithreading.


ORIGINAL DRAFT

There are two groups of people that need to know about the Java Virtual Machine. Those that work directly with the JVM, in terms of implementation, extension or testing, and those who work in it. The latter group is the one most of us fall into and most of us can easily get away with knowing virtually nothing about the internals of the JVM. What we typically forget is that the more we know, the more easily we can get out of trouble when the time comes, and a small investment in a book like this goes a long way to remaining at the top of your trade. If you’re simply curious, have a need to look under the hood, want to improve your understanding or work on a project that touches the JVM directly, this book is an excellent buy.

The JVM is a stack-based execution environment for platform-independent bytecode. But its also much more, given Java’s built-in security features and multi-threading. "Programming for the Java Virtual Machine" goes beyond explaining how the JVM functions. It is not a reiteration of the JVM specification, but rather a means of unpeeling the onion one layer at a time. After a quick introduction in chapter 1, chapter 2 introduces the Oolong language which represents the bytecode at a lower level, the way assembly language abstracts machine language by adding labels to clarify the purpose of operators and operands.

The first few chapters of the book take a deeper look at the classes, objects, methods, control instructions and verification process in the JVM, with a look at debugging, class loaders and the Java file format right behind that. By the time you finish the first 10 chapters, you’ll have a full understanding of the JVM and how it works with Java bytecode. The exploration is clearly presented, though I would have like more Java code to clarify the Oolong code. The second part of the book is especially intriguing in its exploration of alternative language implementations, including Scheme and Prolog. The book wraps up with a deep, useful and revealing look at security and multithreading.

If you’re not directly involved with security, JVM implementation or language design, you may find this book outside your field of interest. If you’re in that group, it’s required reading, but advanced Java developers will learn key things about the JVM that can only make them better developers and designers. I found the language implementation material especially interesting, though necessarily incomplete. I walked away with a deeper understanding that easily compensated me for the price of entry. For advanced developers, this is highly recommended.