1.7 Versions of the Virtual Machine

The format of the class file, the meaning of the instructions, and the verification algorithm are defined in The Java Virtual Machine Specification. They have not changed significantly since Java was first released.

Over time the Java platform changes. New APIs are introduced. Occasionally, parts of old APIs are deprecated, meaning that they are replaced by something better and the old ones should no longer be used. Eventually, some deprecated features go away entirely.

Sun Microsystems is the steward of the Java platform. Sun is a publicly available specification (PAS) submitter for the International Standards Organization (ISO). Sun referees the process of changing the Java platform specification in accordance with a plan approved by the ISO.

The reference implementation of the Java platform is the Java Development Kit, a free set of software from Sun. Different platform releases get different numbers. The original Java platform was version 1.0. Later, substantial changes were made to the Java platform, signified by the release of JDK 1.1. This incorporated a new way of handling graphics and some minor changes to the Java language, along with a host of new APIs and extensions to existing ones.

The Java 2 platform is the latest platform as of this writing. It includes a new set of tools for building user interfaces, performance improvements, and enhancements to existing features. Although APIs have changed over time, the Java 2 platform represents the first changes to the JVM itself. These changes are quite minor: a change in version numbering and some new rules for floating point.

In a few cases changes in the platform come under the scope of this book. Most notably, the way classes are loaded with the ClassLoader class was altered slightly between JDK 1.0 and 1.1. We will discuss both versions.

Although new releases of the Java platform rarely affect the underlying JVM, this does not always mean that you can use your existing JVM implementations with the new features. Some of the new features require code to be written specifically for the platform hosting the computer to properly interact with the hardware on the platform. For example, the JDK 1.1 reflection methods, which allow programs to determine which methods and fields are available, require special support from the JVM implementation.

The special support comes in the form of native methods. A native method is called just like any other method in the JVM, but it is implemented using non-Java languages like C or C++. This allows it access to the internals of the JVM implementation and to devices and features that are specific to the particular hardware or operating system. These native instructions are different for each platform, just like ordinary programs before Java became available.

When the Java platform changes to require new native methods, the JVM implementation must usually be replaced. The core functionality, which loads and executes instructions, usually does not change, but new libraries are added.

Some platform changes do not require the addition of new native methods. The Java foundation classes, which are a collection of user-interface tools, and the JavaBeans classes, which enable visual program-building tools, were written entirely in Java and could be made to work even on JVM implementations built before the new APIs were invented.

When the original Java specification was released, many users obtained an implementation of the JVM with their web browser. Version 3 of both Netscape Navigator and Internet Explorer contain a JVM with the JDK 1.0 platform. Newer versions of these browsers support later versions of Java, but Navigator 3 and Explorer 3 are still widely in use.

Programming for the Java Virtual Machine
Programming for the Javaв„ў Virtual Machine
ISBN: 0201309726
EAN: 2147483647
Year: 1998
Pages: 158
Authors: Joshua Engel

Similar book on Amazon

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net