Contents | Prev | Next The Java Platform


What is the Java Platform?

The computer world currently has many platforms, among them Microsoft Windows, Macintosh, OS/2, UNIX® and NetWare®; software must be compiled separately to run on each platform. The binary file for an application that runs on one platform cannot run on another platform, because the binary file is platform-specific.

The Java Platform is a new software platform for delivering and running highly interactive, dynamic, and secure applets and applications on networked computer systems. But what sets the Java Platform apart is that it sits on top of these other platforms, and executes bytecodes, which are not specific to any physical machine, but are machine instructions for a virtual machine. A program written in the Java Language compiles to a bytecode file that can run wherever the Java Platform is present, on any underlying operating system. In other words, the same exact file can run on any operating system that is running the Java Platform. This portability is possible because at the core of the Java Platform is the Java Virtual Machine.

While each underlying platform has its own implementation of the Java Virtual Machine, there is only one virtual machine specification. Because of this, the Java Platform can provide a standard, uniform programming interface to applets and applications on any hardware. The Java Platform is therefore ideal for the Internet, where one program should be capable of running on any computer in the world. The Java Platform is designed to provide this "Write Once, Run Anywhere"SM capability.

Developers use the Java Language to write source code for Java-powered applications. They compile once to the Java Platform, rather than to the underlying system. Java Language source code compiles to an intermediate, portable form of bytecodes that will run anywhere the Java Platform is present.

Developers can write object-oriented, multithreaded, dynamically linked applications using the Java Language. The platform has built-in security, exception handling, and automatic garbage collection. Just-in-time compilers are available to speed up execution by converting Java bytecodes into machine language. From within the Java Language, developers can also write and call native methods-methods in C, C++ or another language, compiled to a specific underlying operating system-for speed or special functionality.

The Java Language is the entry ramp to the Java Platform. Programs written in the Java Language and then compiled will run on the Java Plaform. The Java Platform has two basic parts:

These are described in detail later in this paper. Combined, these parts provide an end-user runtime environment for deploying Internet and intranet applications.

The Java Base Platform

The Java Base Platform is the minimum Java Platform that developers can safely assume is present for running Java-powered applets and applications. This platform applies to Network Computers, desktop computers, and workstations (the next section describes the platform for smaller systems). This platform contains the same Java Virtual Machine mentioned before, but has a minimal set of API required to run basic applets and applications. This minimal set is known as the Java Core API, also know as the Java Applet API or Java Base API. Developers who write to this minimum set can feel secure that the program will run anywhere without the need for additional class libraries.

Certain Java Platform licensees (listed in "Where Will the Java Platform Be Deployed?" on page 10") have contracted to include the Java Core API in their particular implementation of the Java Platform. As more class libraries are developed, the Java Base Platform will grow, and these additions will migrate in a timely fashion into the Java Base Platform present on each licensee's operating system.

Another set of APIs, called the Standard Extension API, is being defined by JavaSoft, in partnership with leading industry companies, to extend the base functionality. Over time, some subset of the Standard Extension API will migrate into the Java Base Platform.

The Embedded Java Platform

The Embedded Java Platform is being targeted for consumer devices with fewer resources and more specialized functionality than a Network Computer, such as set-top boxes, printers, copiers, and cellular phones. Such devices might have special constraints such as small memory footprint, no display, or no connection to a network.

The API targeted for this platform is called the Java Embedded API. The Java Embedded API is the smallest API a low-function embedded device can have and still run. Because this platform is still under development, this API has not yet achieved the level of a standard. Consequently this API is not yet well-defined, but it will probably consist of the packages java.lang and java.util. A Java-powered application written for one particular device could operate on a wide range of similar, dedicated devices.

Benefits of the Java Platform

The Java Platform has benefits for the end-user as well as the developer and support personnel:

End-User Benefits

Today, the Java Platform provides live, interactive content on the World Wide Web, with just-in-time software access. Applications are readily available on all operating systems at once, freeing users from having to choose operating systems on that basis. Smaller, less expensive, dedicated systems will eventually be available for specialized applications.

Developer Benefits

The Java Language is a small, "knowable" system and is coupled with a growingly comprehensive set of APIs. Developers can "Write Once, Run Anywhere," which provides tremendous marketing leverage over other languages. In addition, Java development environments on all operating systems compile to a single binary format. Rather than developing on multiple platforms to deliver on multiple platforms, developers can now develop on one platform, saving cost, to deliver on that same platform, which is everywhere. The ability to "Write Once, Run Anywhere" is enough reason for some developers to turn to the Java Language as an alternative to C or C++ even for stand-alone, non-networked applications.

In addition, building applications from shared, reusable objects can further reduce cost by allowing developers to concentrate on creating only what is novel. Developers can distribute by network rather than compete for shelf-space in software stores.

Administrative and Support Benefits

The Java Platform has benefits for corporate computer systems administration departments. Version control and upgrades are simplified because Java-powered applications can be kept in a central repository and served from there for each individual use. In multivendor, multiplatform environments, the number of platforms to support is reduced to one. Emerging lower-cost network computers have the potential to reduce maintenance and capital expenditures. With these network computers, data management can remain centralized while data processing is done locally.

Companies with large intranets, that may not find it worthwhile to upgrade to the latest memory-consuming operating system, can run Java-powered applications on all their existing machines. By providing corporate data in a format readable by Java-powered applications, corporations give users the platform-neutral access to the data they need.

When customers are running on the Java Platform, companies can take advantage of the interactivity of the Internet by moving employee tasks out to customers. Companies can reduce time spent on order-entry by having customers fill in order-entry forms themselves on Web pages. This is more practical than previously possible, because the customer can now be on any operating system.

Applets and Applications

The Java Platform enables developers to create two different kinds of programs:

While applets and applications have different means of being invoked, for the most part they have the same access to a wide range of language capabilities. For example, either an applet or an application can access a host database, retrieve the data it needs, do local data processing, and store the results back to the host.

However, an applet requires a network to run, while an application does not. Applications have greater freedom in that they have full access to system services. For example an application, unlike an applet, can have normal read and write access to files on any disk. Since an applet can potentially be downloaded from an untrusted Web page, it is restricted from having read or write access to any file system except the server from which it came. This constraint will be relaxed when applets can be marked with digital signatures, allowing the end-user to be assured that it has been downloaded unaltered from a trusted source. Where local file storage is required, currently an application is required.

Where Will the Java Platform Be Deployed?

The progression towards ubiquity has great momentum, moving in three stages from browsers, to desktop, workstation and network operating systems, and finally to embedded devices.

First, the Java Base Platform is currently embedded in the top two most widely used Internet browsers, Netscape NavigatorTM, and Microsoft Internet Explorer. It is also available in HotJavaTM, from Sun Microsystems, and will become available in other browsers.

Second, the Java Base Platform will soon be embedded in all leading desktop, workstation, and network operating systems-see Figure 1. Being available on the combination of Microsoft Windows, Macintosh, OS/2, and UNIX computers, the Java Base Platform will have an installed base as large as these platforms combined. By targeting this platform, developers will tap into the new, exploding market for Web and intranet applications without being tied to any particular hardware or operating system environment. The Java Platform will become the platform for all network- and Web-based computing.

Third, with the Java Processors family of integrated circuits, the platform will be available in a wide range of consumer and industrial embedded devices such as dedicated Network Computers, set-top boxes, printers, copiers and cellular phones.

Figure 1. Companies licensing the Java Base Platform to embed in operating systems.

Java Platforms

The Java promise is "write once, run anywhere". The first half of this promise is supplied by the Java programming language. As a language Java supports the needs of modern computing tasks with built-in features like threading, garbage collection and internationalization. Standard Java packages that are part of the JDK support even more with powerful networking classes, rich GUI frameworks and useful IO classes. Software developers need these features to create applications for today's marketplace.

The second half of the Java promise is supplied by the Java application environment, the component that allows a Java applet or application to execute on a specific system. A Java application environment includes a Java virtual machine and the necessary support packages and files. Java application environments are tailored to provide a good match between the Java programming language and the underlying system.

From the beginning, Java was designed to be scalable. To achieve this goal, application environments are needed for a variety of different systems. Java first gained notice with Internet browsers. Then came application environments for desktop systems like Windows 95/NT and UNIX. Now Java application environments are finding their way into network computers, consumer devices and embedded systems -- even smart cards where the Java application environment must fit into a tiny amount of memory!

Application-Hosted

Today most major Internet browsers support Java. A browser is an example of an application-hosted Java application environment. It is sometimes called a *container application* because it contains a Java application environment that executes Java code. Some browsers have a Java application environment built-in while others use the Java application environment available in the underlying OS. Another example of a container application is a web server that supports Java servlets.

OS-Hosted

Most common operating systems now offer a Java application environment that can execute Java applications. An important role of any Java application environment is to map system services and resources to the system-independent portion of the Java application environment. For example, if an operating system has a native window system or thread library, the Java application environment can use these directly. Providing access to these kinds of resources without affecting the essential portability of Java code is an important part of developing a Java application environment.

The degree to with the Java application environment is integrated into the underlying operating system varies. Early efforts to add Java to desktop operating systems provided minimal integration. This led to problems with application installation and execution as well as access to operating system resources. More recently Java application environments for desktop operating systems have provided better integration so that Java applications behave more like native applications.

The Java Runtime Environment is an example of an OS-Hosted Java application environment. The JRE can be downloaded from http://www.javasoft.com for use on Solaris or Win32 systems.

JavaOSTM

JavaOS is a Java-centric operating system with a feature set and architecture designed to provide a complete Java environment for network computers. Network computers differ significantly from conventional stand-alone personal computers because they work entirely within a client-server environment. The main goal of the client-server computing model is to divide tasks by concentrating the user-interface on the client side and data management on the server side. JavaOS provides the operating system facilities needed to execute Java applets on the client side of this environment.

Because they are designed to provide only the user-interface portion of a client-server application, network computers offer the promise of low-cost computing devices with simplified client-side system administration. These two advantages significantly reduce the total cost of ownership for enterprise users.

JavaOS supports only 100% Pure Java applets running inside a Java-based container application like HotJava browser. The same Java applets that run in a web browser on a PC can run on JavaOS on a network computer. These applets communicate through a network with applications like data base management systems running on a server.

Sun has licensed JavaOS to several manufacturers who will build JavaOS-based network computers that use a variety of different CPUs and peripherals. Future versions of network computers will use Java Processors.

JavaPC

JavaPC is a version of JavaOS targeted at legacy PC's. It is a software product that turns a PC into a network computer. This is helpful for companies with an installed base of PC's that want to migrate towards a JavaOS-based network computer architecture. JavaPC provides a cost-effective way to enable this migration while protecting an investment in legacy PC's.

PersonalJava and EmbeddedJava

PersonalJava and EmbeddedJava are Java application environments designed to run on top of real-time operating systems. PersonalJava is oriented towards communications-centric products like webtop devices and webphones. EmbeddedJava is designed to support high-volume embedded products that have severe resource limitations. PersonalJava and EmbeddedJava demonstrate Java's scalability by providing subsets of the core Java APIs.

Java Card

Java Card brings the world of Java to smart cards, credit card sized devices with tiny embedded microprocessors. Smart cards provide a secure and programmable device for enabling digital commerce. Java Card includes a small Java virtual machine and a limited set of packages.

There are many benefits to basing smart cards on Java Card. From an implementation point of view the Java Card virtual machine and instruction set are a good match to the needs of a smart card. Since Java provides both security and communications support it is good for establishing a connection between a retail transaction and the banking system. Financial value and transaction records can be represented as Java objects on the smart card and conveniently transferred to other Java based devices.

Java Processors

Improve Java performance dramatically in embedded applications. The picoJavaTM CPU core is a licenseable technology that removes the need for a Java interpretor or JIT (Just-In-Time compiler) by directly executing Java bytecode into the silicon. This simplifies system design, improves performcnce, and reduces memory requirements. picoJava helps licensees develop PDAs, smart-phones and other embedded consumer devices that run Java at its most cost-effective and efficient.

The picoJava processor core is optimized for Java and its unique demands, such as multithreading and garbage collection. Sun Microelectronics' microJavaTM-701 processor prototype validates picoJava design and paves the way for licensees to produce their own Java-based microprocessors and devices. Evaluation boards for picoJava II, based on the 701 will soon be available for demonstration and design.

JavaOSTM

JavaOS is an operating system that implements the Java Base Platform for running Java-powered applets and applications. As such, it implements the Java Virtual Machine, Java Embedded API, and the underlying functionality for windowing, networking and file system.

JavaOS is designed for Network Computers, consumer devices, and network devices for embedded applications, such as printers, copiers and industrial controllers. These devices will have instant turn-on, no installation setup, no system administration, and, when on a network, can be automatically upgraded.

JavaOS will be widely ported to a range of microprocessors, including the Java Processors family. When JavaOS runs on a Java Processor, the microprocessor's silicon Java Virtual Machine is used.

A Word About the Java Language1

The Java Language is the means for a developer to write source code. Applets and applications written in the Java Language compile to a form that runs on the Java Platform.

When developers write source code in the Java Language, this code can call APIs defined in the Java Core API, Java Standard Extensions API, or a new API defined in the source code itself. At runtime, all three kinds of APIs have equal standing, and are not distinguished on the basis of their source. Compiling the source with the Java Compiler generates bytecodes that are executed on the Java Platform.

As professional programming languages go, the Java Language is simple, yet flexible and powerful. It is object-oriented (with single inheritance), statically typed, multithreaded, dynamically linked, and has automatic garbage collection.

Its syntax is based on C and C++, so those programmers can pick it up quite easily. There's less redundancy which means developers should be able to more easily read someone else's code. For example, the Java Language has no user-defined operator overloading, as is found in C++.

The Java Language gives developers the ability to do three different kinds of programming in one language. Like the symbolic programming language Smalltalk, the Java Language is object-oriented, has dynamic linking, and has a class hierarchy with single inheritance. For numeric programming, the Java Language has platform-independent data types, array bounds-checking, and well-defined IEEE arithmetic. These capabilities provide good grounding for writing stable numerical algorithms that give repeatable results. For systems programming, expressions, statements, and operators in the Java Language are in most cases the same as in the C language.

The Java Language encourages catching bugs early, during development, before the software is released. It does this by strong data typing, automatic garbage collection, array bounds checking, lack of automatic type coercion, and the lack of the pointer data type. These safeguards help in the age of the Internet, where developers are deploying software very rapidly.

The Java Language has multithreading built in, with a strong model of how thread-critical code can be synchronized to avoid race or timing problems. With the growth of multiprocessing and a decrease in processor costs, the Java Language is poised to enable a new generation of concurrent applications and services.

Exception and thread mechanisms are integrated with the language and its type system. In addition, the language includes dynamic linking of subclasses with methods that override or add functionality at runtime. In other environments, these features have typically been arcane and complicated system services. There is a great simplicity and advantage to having these facilities in the language and therefore portable between platforms. The language also defines what binary compatibility is, by defining a class (.class) file format, which includes the instructions for the Java Virtual Machine in the form of bytecodes.



Contents | Prev | Next
1 This section and the Virtual Machine section are borrowed heavily from the keynote address given by Bill Joy, Founder and Vice President of Research at Sun Microsystems, to Internet World on April 30, 1996.

Copyright © 1997 Sun Microsystems, Inc. All rights reserved.