Programming Books C Java PHP Python Learn more Browse Programming Books
Qty:1
  • List Price: $44.99
  • Save: $7.97 (18%)
Only 5 left in stock (more on the way).
Ships from and sold by Amazon.com.
Gift-wrap available.
+ $3.99 shipping
Used: Good | Details
Sold by Olathe Books
Condition: Used: Good
Comment: Connecting readers with great books since 1972. Used books may not include companion materials, some shelf wear, may contain highlighting/notes, may not include cd-rom or access codes. Customer service is our top priority!
Access codes and supplements are not guaranteed with used items.
Sell yours for a Gift Card
We'll buy it for $2.00
Learn More
Trade in now
Have one to sell? Sell on Amazon
Flip to back Flip to front
Listen Playing... Paused   You're listening to a sample of the Audible audio edition.
Learn more
See this image

Programming for the Java¿ Virtual Machine Paperback – July 2, 1999

ISBN-13: 078-5342309720 ISBN-10: 0201309726

Buy New
Price: $37.02
23 New from $33.37 18 Used from $7.81 1 Collectible from $115.28
Amazon Price New from Used from
Paperback
"Please retry"
$37.02
$33.37 $7.81
Year-End%20Deals%20in%20Books

Frequently Bought Together

Programming for the Java¿ Virtual Machine + The Java™ Virtual Machine Specification (2nd Edition)
Price for both: $71.62

Buy the selected items together
NO_CONTENT_IN_FEATURE

Hero Quick Promo
Year-End Kindle Daily Deals
Load your library with great books for $2.99 or less each, today only. Learn more

Product Details

  • Paperback: 512 pages
  • Publisher: Addison-Wesley Professional (July 2, 1999)
  • Language: English
  • ISBN-10: 0201309726
  • ISBN-13: 978-0201309720
  • Product Dimensions: 7.3 x 1.3 x 9 inches
  • Shipping Weight: 1.8 pounds (View shipping rates and policies)
  • Average Customer Review: 4.4 out of 5 stars  See all reviews (5 customer reviews)
  • Amazon Best Sellers Rank: #1,121,469 in Books (See Top 100 in Books)

Editorial Reviews

Amazon.com Review

Besides an expert tour of the inner workings of the Java Virtual Machine (JVM), Programming for the Java Virtual Machine provides a guide to Oolong, a low-level assembly language for Java. Behind Java's "write once, run anywhere" philosophy lies the JVM, an ideal model of a CPU with instructions (called bytecodes), memory, etc. In today's Java compilers, the details of the JVM are invisible, but this book explores how to write the bytecodes directly in Oolong.

In the initial stages of the book, the author focuses on the Oolong instruction set, presenting this object-oriented assembly language for Java in a notably clear fashion. The author even demonstrates the basics of Oolong, including classes, using concise examples.

The Java verification process, which allows the JVM to check whether a given Java .class file is safe to run, receives detailed attention as do debugging techniques, the Java class loader, and the contents of .class files. The book then offers a thorough description of how Java language elements are compiled into bytecodes, illustrated with Oolong.

In a section aimed specifically at researchers, the author shows how other programming languages can be coded in Oolong for use with the JVM, including Scheme, Prolog, and C++ templates. The book closes with a discussion of performance issues (including optimization techniques), security concerns, and a full listing of the Oolong instruction set.

Programming for the Java Virtual Machine is sure to show up on reading lists for computer science students. It shows that assembly language does not disappear on the Java platform, but rather that it can extend the functionality and performance of your Java programs. --Richard Dragan

From the Inside Flap

Every time you compile a Java program to produce a class file, you've written a program for the Java virtual machine. This book is designed to take you to the next level: writing Java virtual machine (JVM) programs directly, without the aid of a Java compiler. A number of people would want to do this:

Advanced Java programmers

Security experts

Language designers and compiler writers

Advanced Java programmers want to know how the JVM works, in detail. Learning the details of the JVM will help improve your understanding of what a Java program does. Some messages from the JVM will be clearer after you understand how the JVM looks at your program. This understanding can also help you improve the performance of your programs.

Another reason for advanced Java programmers to learn JVM programming is that it will help you understand how JVM code moves. One of the most important uses of Java is to download applets from the Internet (or other sources). The JVM uses a class called ClassLoader to incorporate code from the Internet into the JVM. The ClassLoader has many other uses. The Java Foundation Classes use subclasses of ClassLoader to load new Look and Feel classes. Some databases use other subclasses of ClassLoader to incorporate queries written in Java directly into the database.

Security experts already know that the Java language is designed with security features in mind. Java promises to allow users to download applets from the Internet without fear. However, these promises seem empty until you know precisely how the JVM keeps the promises Java makes. This book discusses in detail how the JVM verification algorithm works. Knowing the verification algorithm will give you greater confidence in the security of the JVM.

This book will give you the tools you need to build your own secure systems on top of the JVM, by explaining both what promises the JVM makes (and how it keeps them) and what promises it doesn't make.

Language designers want to design new languages for the Java virtual machine. Although the Java language is excellent, perhaps the best general-purpose programming language ever created, there are still times when a different language does the job better. Sometimes these are general-purpose languages built into an application (like WordBasic in Microsoft Word or Emacs Lisp). Others are tiny, special-purpose languages (like SQL, regular expressions, or filters in PhotoShop).

This book describes compilers for two languages, Scheme and Prolog, which are very different from Java. These compilers generate JVM code and use a subclass of ClassLoader to load it into the system. By compiling into JVM code, these non-Java languages gain some of the "Write Once, Run Anywhere" properties of Java without losing the power of the original language. These compilers can be used as a starting point for compiling other languages. Other languages already implemented for the JVM include Tcl, ML, Eiffel, Python, and Ada.

As more and more programs are written in Java, there is an increasing need to implement new languages. By implementing these languages using the JVM, you can get the portability and performance of the JVM. Prerequisites

This book assumes that you have a good basic knowledge of Java. Many of the ideas in the book are explained in terms of Java; at the same time, the book tries to explain Java in terms of the JVM. Hopefully, this will reinforce your understanding of both the Java language and the Java virtual machine.

If you're new to Java, let me recommend The Java Programming Language, by Ken Arnold and James Gosling. It's an excellent introduction to the language written in part by the originator of Java himself, James Gosling.

Many sections have exercises. The exercises don't introduce new material, but they do reinforce the existing lessons. Most of the exercises ask you to write small pieces of code. For some exercises, answers are provided at the back of the book. If you're using this book for a class and you've been assigned the exercises as a homework problem, then turning in the answers at the back of the book is cheating! Fortunately, real JVM programmers are trustworthy. Books

This book has been designed to stand on its own. You should be able to read it without owning any other books on Java. However, there are two books which you may find very useful.

One is The Java Virtual Machine Specification (JVMS), by Frank Yellin and Tim Lindholm. It is the "truth" of the Java virtual machine. All JVM implementers, including Sun itself, are expected to adhere to the definition of the Java virtual machine contained in the JVMS. Wherever your JVM implementation disagrees with the JVMS, it is always the JVMS that is correct. I recommend that you have a copy on hand if you want to do a lot of JVM programming, because it is the final word on any JVM-oriented question.

Another book I recommend is The Java Language Specification, by James Gosling, Bill Joy, and Guy Steele. This is a large, thick tome that contains the absolute truth about the Java language. It does an excellent job of specifying all the details of what a Java program means. It is meticulously precise, but it can still be a lot of fun to read because it throws in many funny examples and quotes. Even just browsing the index can be a treat. (Look up the index entry for prime numbers to see what I mean.Paper copies are available at any bookstore.

While you're on the Internet, let me recommend one other source of information. The newsgroup comp.lang.java.machine is dedicated to discussing how the Java virtual machine works, how it is implemented, and so forth. I'm a frequent reader and contributor, and there are many other experts willing to share their copious knowledge. Acknowledgments

I would like to thank Stefan Gower for giving me the original idea of implementing a Scheme compiler for the Java virtual machine. Christopher Cook, William Andersen, Brian Peterson, and Paul Brinkley were indispensable, allowing me to explain JVM concepts to them until I finally found a lucid explanation.

Marina Lang at Addison Wesley Longman was instrumental in guiding me through the process of getting a book written. Thanks also to the many reviewers she found who helped me turn drafts into something readable.

Finally, I would like to thank the regular posters to comp.lang.java.machine, the newsgroup for the JVM. They provided answers to a lot of questions and brought up questions I had not previously considered.

0201309726P04062001


More About the Author

Discover books, learn about writers, read author blogs, and more.

Customer Reviews

4.4 out of 5 stars
Share your thoughts with other customers

Most Helpful Customer Reviews

17 of 18 people found the following review helpful By A Customer on May 23, 2000
Format: Paperback
The first five chapters of this book provide an introduction to programming in "Java assembly language" using the assembler included on the CD-ROM. This introduction does a good job of explaining the JVM instructions, but could have used more exercises to help the reader learn and practice using more of the instructions. Additionally, the chapters, appendices, and index could have been better organized so that I didn't have to keep flipping through pages to find the syntax and semantics of instructions.
The remainder of the book explores various areas such as verification, debugging, the class file format, security, and most importantly, compiling Java and other languages into JVM code. Mostly, this material is a tutorial introduction to information provided in the Java Virtual Machine Specification, but there is some original material in the chapters devoted to compiling Scheme and Prolog.
Be aware that this book contains numerous errors; you'll want to grab the errata list from the Addison-Wesley website.
Comment Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback. If this review is inappropriate, please let us know.
Sorry, we failed to record your vote. Please try again
9 of 9 people found the following review helpful By Stephen Tse on April 18, 2000
Format: Paperback
Together with author's reference implementation in CD, this book is a "must" tutorial for anyone who wants to translate other languages (scheme, prolog...) into java bytecode. It starts with discussions of jvm and bytecode, and then gives deep anaylsis of java the language from the viewpoint of bytecode. From this, reader gains significant insight on how to code in java the best way.
Although the book can expand more on its scheme->java implementation, I find it a very good starting point for any serious work. I wholeheartedly recommend the book to anyone interested in java and its jvm.
Comment Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback. If this review is inappropriate, please let us know.
Sorry, we failed to record your vote. Please try again
3 of 3 people found the following review helpful By Eric W. Engler on April 13, 2007
Format: Paperback
This is truly a classic that will live on for years. This is a good read even for people who aren't into Java. The VM concepts are well explained here, and the text is surprisingly easy to read, given the heavy nature of the subject. The JVM versions have moved on, but this covers the basics very well, and is an excellent starting point for anyone who wants to know what a Virtual Machine is about under the covers.
Comment Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback. If this review is inappropriate, please let us know.
Sorry, we failed to record your vote. Please try again
15 of 21 people found the following review helpful By Christopher Burnley on March 30, 2000
Format: Paperback
Although this book gives some useful insights on compiling other languages into JVM bytecode, it doesn't present any revolutionary concepts. It is not an expert or comprehensive reference by any means and wastes way too many pages on explaining the syntax of the oolong language rather than the workings of the JVM itself. For instance the bytecodes generated and the behaviour of the 'finally' clause in isolation is explained, but not in conjuction with exceptions which it is most commonly used. Unfortunately, like so many other Java references, it resorts to wasting pages on printing Java APIs (in particular the security APIs) when Javadoc in html form is so much more efficient to read.
Having said that, the section on verification is interesting and the book itself does spark the imagination of what is possible (and what is not) with JVM bytecode.
Comment Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback. If this review is inappropriate, please let us know.
Sorry, we failed to record your vote. Please try again
3 of 4 people found the following review helpful By Ganeshji Marwaha on May 20, 2006
Format: Paperback
Java programming language can be visualized as being composed of 2 components

1. Java Compiler - Compiles the java programs we write to byte-code in .Class format.

2. Java Virtual Machine (JVM) - Executes the byte-codes that is in .Class format.

This essentially means that the JVM only cares about the byte-codes, and not about the high-level language that was used to program it. As you can see, this seperation of concerns opens up a lot of possibilities like

1. You can write a java program and compile to byte-code

2. Directly write byte-codes

3. Write code in some asssembly language and assemble it to byte-codes

4. Write code in an interesting scripting language like Ruby or Python and compile it to byte-codes.

All paths lead to the same destination; JVM can run the resulting byte-codes. The possibilities are endless if you have this understanding. In fact, there are more than a 100 languages that compile to java byte codes at present.

In this book, the authors intention is to get you started with the JVM features and how you can write programs that can be executed by the JVM. In the process you will learn the following...

1. What is inside the class file: An assembly language called Oolong, whose mnemonics closely resemble the class file op-codes is used to explain this concept. The author has clearly done an excellent job in decoding the JVM spec for this purpose.

2. Class loading: Loading classes into class area, statics etc are well explained in this section.

3. Byte-Code verification: A very important topic that is addressed only at a shallow level here.
Read more ›
Comment Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback. If this review is inappropriate, please let us know.
Sorry, we failed to record your vote. Please try again

What Other Items Do Customers Buy After Viewing This Item?