| Contents | Prev | Next | The Java Platform |
The Java Platform has two main parts, the Java Virtual Machine and the Java API, as shown in Figure 2.

Figure 2. The Java Base Platform is uniform across all operating systems.
In this figure, the Java Base Platform is the part shown in black, including the blocks labeled Adapter. The Java API includes both the Java Core API and Java Standard Extension API. The classes are the implementation of that API. The Java Virtual Machine is at the core of the platform. The Porting Interface lies between the Java Virtual Machine and the operating system (OS) or browser. This Porting Interface has a platform independent part (shown in black) and a platform-dependent part, shown as Adapters. The OS and JavaOS provide the window, filing and network functionality. Different machines can be connected by a network, as shown.
The Java API framework is open and extensible. Specifications for each interface are being developed by industry-wide specialists in each area. Forthcoming specifications will be published and open to industry review. Implementations of the API specifications will be available from JavaSoft and others throughout the industry. In today's environment of rapid innovation, the Java API framework allows that innovation to easily exist as extensions to the Java Platform.
The API is organized by groups, or sets. Each of the API sets can be implemented as one or more packages (namespaces). Each package groups together a set of classes and interfaces that define a set of related fields, constructors, and methods.
The Java Virtual Machine is key to the independence of the underlying operating system and hardware-it is a platform that hides the underlying operating system from Java-powered applets and applications. And it's very easy to port the Virtual Machine to a browser or another operating system.
In addition, the Virtual Machine defines a machine-independent format for binary files called the class (.class) file format. This format includes instructions for a virtual computer in the form of bytecodes. The bytecode representation of any Java Language program is symbolic in the sense that offsets and indexes into methods are not constants, but are, instead, given symbolically as string names. The first time a method is called, it is searched by name in the class file format, and its offset numeric value is determined at that time for quicker access at subsequent lookups. Therefore, any new or overriding method can be introduced late at runtime anywhere in the class structure, and it will be referred to symbolically, and properly accessed without breaking the code.
The bytecodes are a high-level representation of the program so that optimization and machine code generation (via a just-in-time compiler) can be performed at that level. In addition, garbage collection can occur inside the Virtual Machine, since it holds variables in stacks in the Java Platform address space.
By targeting the APIs in the Java Platform, developers are assured that their applications will run everywhere. (See "The Embedded Java Platform" on page 7 for the single possible exception-dedicated, constrained, embedded systems, such as set-top boxes, printers, copiers, and cellular phones.)
The Java Core API defines the basic building blocks for creating fully functional Java-powered applets and applications. It includes all the classes in the java package: java.lang, java.util, java.io, java.net, java.awt, and java.applet. (Notice that the Java Core API is currently the full set of APIs available in version 1.0.2 of the Java Development Kit from JavaSoft.)
Over time, as the platform develops, this base will grow, both as we develop new core technology, and as some of the Standard Extension API migrate into the Java Core API.
This section describes the Java Standard Extension API. These extensions are "standard" in that they form a published, uniform, open API that anyone can implement. Once defined, they can be added to, but, to maintain backward compatibility, not changed in a way that calls to them would fail. Over time, new extensions will be added. In addition, some of these extensions will migrate into the Java Core API.
The current plan for this migration is shown in the following table:
An implementation should do whatever is appropriate for the platform it runs on, within its hardware constraints. For example, desktop operating systems that have access to a speaker will produce audio; however, a mainframe or network operating system that has no speaker is permitted to do the equivalent of a no-op or some other well-defined behavior, such as throw an exception.
The Java Security API is a framework for developers to easily and securely include security functionality in their applets and applications. This functionality includes cryptography, with digital signatures, encryption and authentication.
Java Security includes an abstract layer that applications can call. That layer, in turn, makes calls to Java Security packages that implement the actual cryptography. This allows third-party developers specializing in providing cryptographic functionality to write packages for Java Security. Java Security also includes system support for key management, including a secure database, certificate facilities, and so on.
This architecture provides for replaceable, upgradable security. Whenever a stronger algorithm or a faster implementation becomes available, modules can be replaced in the platform, in a manner completely transparent to applications.
The Java Media API defines the multimedia classes that support a wide range of rich, interactive media on and off the Web, including audio, video, 2D, 3D, animation, telephony, and collaboration. An extensible Media Framework provides for common control and synchronization of all time-based media (audio, video, animation, video teleconferencing) as well as for filters and processors.
The Java Media API is composed of several distinct components, each associated with either a specific type of media (audio, video, 2D, 3D), or a media-related activity (animation, collaboration, telephony). Collectively, these interfaces provide Java Language programmers with the ability to handle a wide variety of different media types within their applications and applets.
The Java Media API is highly extensible. The API accommodates today's large and ever-changing suite of media transports, containers, and encoding formats, and allows the addition of new media-related functionality as they become available.
JavaSoft has been working with a group of industry-leading companies to establish the standards for Java Media: Adobe®, Apple, Intel, Macromedia, Netscape, SGI, and Sun Microsystems.
The components of the Java Media APIs are as follows.
The Enterprise classes connect Java-powered applications to enterprise information resources. There are currently three groups for connectivity: JDBCTM (Java Database Connectivity), Interface Definition Language, and Remote Method Invocation.
The JDBC API defines classes to represent constructs such as database connections, SQL statements, result sets, and database metadata. JDBC allows a Java-powered program to issue SQL statements and process the results.
In conjunction with JDBC, JavaSoft is releasing a JDBC-ODBC bridge implementation that allows any of the dozens of existing Microsoft ODBC database drivers to operate as JDBC drivers. The JDBC-ODBC bridge can run on the server rather than client side using a JDBC driver that translates to a DBMS-independent network protocol.
The Java Commerce API brings secure purchasing and financial management to the Web.
World wide purchases of retail and wholesale goods and services during 1994 totaled 4.6 trillion dollars, 13% of which was spent remotely via catalogs, television, and various public and private communications networks. As this remote commerce migrates to the Internet, a standard framework within which to conduct these transactions becomes increasingly important. This is especially true as a rapidly increasing number of players vie for position to provide such facilities as electronic currency, online shopping malls, digital signature verification, and financial analysis.
The initial component of the Java Commerce API is the Java Wallet, which defines and implements a client-side framework for conducting network-based commerce. Think of Java Wallet as an empty wallet ready to hold credit cards and cash, and a blank ID card ready to be filled in with personal information.
The Java Wallet provides:
Java Server is an extensible framework that enables and eases the development of a whole spectrum of Java-powered Internet and intranet servers. The framework API contains server-side class libraries for server administration, access control, and dynamic server resource handling. The framework also encompasses the Servlet API.
Servlets are platform-independent Java-powered objects, the server side counterpart of applets. Servlets can reside locally on the server, or be downloaded to the server from the net under security restrictions. Servlet examples range from simple HTTP servlets (efficient replacements of cgi-scripts) to more complex servlets using JDBC/ODBC that offer database connectivity.
The Java Management API is a collection of Java Classes that provide the building blocks for integrated management. It does this by providing a number of interfaces, classes, applets, and guidelines that facilitate the development of integrated management solutions.
The Java Management API is composed of several distinct components, each associated with an aspect of the total management space. Taken together the objects defined using the Java Management API will encapsulate distributed network, system, and service management components.
The components of the Java Management APIs are as follows:
The "Java Management API User Interface Style Guide" provides guidelines for developing interfaces for configuration and troubleshooting of the system, network, and service elements that make up the computing infrastructure.