Solaris 8 Software Developer Supplement

Java 2 SDK, Standard Edition, version 1.3.0

J2SE 1.3.0 is an upgrade release for Java 2 SDK. The software includes the following new features and enhancements.

Each of these features is described more fully below. For detailed information about the new features in J2SE 1.3.0, see the Java 2 Platform documentation at http://java.sun.com/j2se/1.3/docs. The Java 2 Platform documentation includes the API specification for J2SE 1.3.0.

Performance Enhancements

Many enhancements have been made to improve the performance of the Java 2 SDK in version 1.3.0 These changes include the addition of the Java HotSpotTM Client Virtual Machine (VM) and the Java HotSpot Server VM, both of which implement high-performance Java HotSpot technology. The Java HotSpot Client VM is tuned to maximize performance on client systems, improving performance in areas of startup time and memory footprint. The Java HotSpot Server VM is tuned to maximize performance of program execution speed and is aimed at server applications that are less concerned with startup and memory footprint.

J2SE 1.3.0 also includes newly tuned class libraries for improved runtime performance.

Easier Web Deployment

Applet Caching

J2SE 1.3.0's new applet-caching feature ensures that often-used applets are always available for rapid loading and fast startup by keeping copies of the applets in a local cache. When an applet has been downloaded more than once, it can be stored in the local applet cache. This storage eliminates the need for a browser to download an applet over the network every subsequent time that the applet is needed. The local, cached copy can be used instead.

This feature is valuable for large, high-use applets. Many enterprise applets, for example, are in the megabyte-size range, and applets that large can take tens of minutes to load over a network. The new applet-caching feature eliminates the download time, enabling businesses to use a larger array of more powerful applets than ever before.

Automatic Deployment of Optional Packages

J2SE 1.3.0 also supports automatic deployment of optional packages. Optional packages are sets of features and APIs that, while not part of the Java 2 Platform, Standard Edition, are available separately for developers to use for specialized programming needs. Examples are Java Media Framework technology and the JavaHelpTM optional packages.

Before J2SE 1.3.0, an applet that used one or more optional packages had to trust that up-to-date versions of the optional packages were installed on every client that might want to run the applet. Without the proper optional package installed on the client, the applet could exhibit unintended behavior or not run at all.

With J2SE 1.3.0, applets can specify version and vendor information for any optional packages that they require. Developers can have their applets specify a URL at which the latest version of a required optional package can be downloaded if any of the following conditions are met.

J2SE 1.3.0 supports any native and Java language installer programs that an optional package might have, automatically launching the installer program when a new version of an optional package is retrieved from the network.

Enterprise Interoperability

Java IDL and RMI-IIOP

J2SE 1.3.0 includes two significant enhancements to support for CORBA technologies: a production CORBA IDL compiler written in the Java language and the RMI over IIOP (RMI-IIOP) API. CORBA Interface Definition Language (IDL) is a language that defines only the interfaces for distributed systems. By using a neutral language to define interfaces, CORBA can support multiple languages. For the first time, the Java 2 SDK, Standard Edition includes an IDL compiler to compile language-neutral CORBA IDL into standard Java language bindings. These language bindings work with the Java IDL Object Request Broker (ORB) to support traditional CORBA programming in the Java programming language.

Since version 1.1 of the Java platform, the Remote Method Interface (RMI) has allowed programmers to write interfaces for distributed computing directly in the Java language. Because RMI used its own wire protocol, programmers had to give up the ability to communicate with objects written in other languages when they used RMI. RMI-IIOP uses the Java IDL ORB to enable the standard CORBA wire protocol, Internet InterORB Protocol (IIOP), to be used with RMI. Since IIOP is used for all communication, objects written in other languages such as C++ can communicate with RMI over IIOP distributed objects. Further, RMI has been accepted as the CORBA standard for mapping interfaces in the Java programming language to CORBA IDL. To facilitate programming in other languages, CORBA standard IDL can be generated from RMI-enabled classes. Existing RMI programs can be converted to use the IIOP protocol, typically with very limited changes.

RMI-IIOP combines the programming ease of RMI with JavaIDL's CORBA-compliant interaction with software written in other languages. By adhering to a few restrictions, RMI programmers can now use CORBA's IIOP communications to protocol to communicate with clients of any type, whether written entirely in the Java programming language or made up of components written in other CORBA-compliant languages.

Java Naming and Directory Interface (JNDI) API

J2SE 1.3.0's new Java Naming and Directory InterfaceTM (JNDI) API enables developers to add naming and directory functionality to applications written in the Java programming language. JNDI is designed to be independent of any specific naming or directory service implementation to enable seamless connectivity to heterogeneous enterprise naming and directory services. Thus a variety of services — new, emerging, and already deployed ones—can be accessed in a common way. Developers can use J2SE 1.3.0 to build powerful and portable directory-enabled applications by using this industry-standard interface.

The JNDI architecture consists of an API and a Service Provider Interface (SPI). Java applications use this API to access a variety of naming and directory services. The SPI enables a variety of naming and directory services to be plugged in transparently, allowing the Java application to access their services. JNDI in the J2SE 1.3.0 release comes with service providers for accessing the following services:

Security Advances

With the security enhancements available in J2SE 1.3.0, developers have more tools at their disposal for protecting their technology investments. New support for RSA signatures and J2SE 1.3.0's enhanced dynamic trust management facilities also greatly increase the ease of web-based deployment.

Support for RSA Signatures

J2SE 1.3.0 includes a cryptographic service provider to support the widely used RSA signatures for electronically signing software that is delivered over the Web. Standard RSA certificates are supported, including those from VeriSign and Thawte.

Prior to J2SE 1.3.0, Java platform users who wanted to use RSA certificates needed to write their own RSA service providers or purchase an RSA service provider from a third party. Now an RSA provider is included as a standard part of J2SE 1.3.0.

Dynamic Trust Management

New dynamic trust management facilities in J2SE 1.3.0 provide pop-up dialogs to let users validate applet signers, eliminating the need to deploy security key files to each client that runs the signed applet.

Previously, if a user wanted to give an applet from a trusted source extra security permissions to allow the applet to perform normally forbidden operations, the user needed to preconfigure his or her local cache of trusted signer certificates to recognize the certificate of the applet's trusted source. This would need to be done for every client machine on which the applet might potentially be run.

J2SE 1.3.0 provides a better solution by providing facilities to extract the applet's signers from the applet's codesource and pass them to the browser. The browser then verifies the certificate chain all the way up to its root certificate, and checks if that root certificate is contained in the browser's database of trusted root certificates. If so, the browser displays the chain of the authenticated signer and give the user the option to remove all security restrictions on the applet.

Improved Support for Public-Key Certificates

J2SE 1.3.0 provides enhanced support for X.509 public-key certificates. J2SE 1.3.0 now supports all X.520 attributes that are either mandated or recommended by the most recent proposed standard protocol (RFC 2459). In addition, J2SE 1.3.0 can handle multiple Attribute/Value Assertions within a Relative Distinguished Name.

Java Sound

The Java Sound API enables Java programs to capture, process, and play audio and Musical Instrument Digital Interface (MIDI) data. These new capabilities enable developers to create new types of applications, including:

The Java Sound API is supported by an efficient sound engine that guarantees high-quality audio mixing and MIDI synthesis capabilities for the platform. More specifically, the implementation that is included with J2SE 1.3.0 supports the following features:

Additionally, the API defines a set of service provider interfaces that developers can use to extend the capabilities of the current implementation. Users can install modules that provide support for additional file formats, codecs, and devices. The API includes methods for querying and accessing the resources currently available on the system.

Enhanced APIs and Improved Ease of Development

AWT Enhancements

J2SE 1.3.0 has a new Robot API that is designed to make automated Abstract Window Toolkit (AWT) and Swing testing possible. The Robot API enables code that is written in the Java programming language to generate low-level native mouse and keyboard input events. Because the events are generated at the operating system level, they are indistinguishable from real user input to the rest of the AWT.

Though designed primarily to improve testability, the Robot API also provides other benefits:

J2SE 1.3.0 also has an improved API for printing. The new printing API gives developers an easy mechanism to print the AWT components by using native platform facilities. By using the new API, developers can control properties of a print job such as destination, number of copies, page ranges, page size, orientation, print quality, and more.

Java 2D Technology Enhancements

J2SE 1.3.0 introduces support for rendering on multiple monitors the GUI Frames and Windows that belong to the same application. The Java 2DTM API supports three multi-screen configurations:

With J2SE 1.3.0's new dynamic font-loading API, a developer can create and load TrueType fonts during runtime. Developers can use the Java 2D API to give their dynamically loaded fonts the desired features such as size, style, transforms, and others.

The Java 2D API in J2SE 1.3.0 now supports the Portable Graphics Network (PGN) format, a flexible, extensive, non-proprietary file format that represents lossless and portable storage of raster images. PGN supports gray scale, indexed-color, and truecolor images, with an optional alpha channel.

Java Platform Debugger Architecture (JPDA)

JPDA technology is a multi-tiered debugging architecture that enables tool developers to easily create debugger applications that run portably across platforms, virtual-machine implementations, and J2SE versions.

JPDA consists of three layers:

Internationalization

The internationalization enhancements in the J2SE 1.3.0 release give developers even more flexibility in localizing their applications for international users. Two new features are described here.

Input methods are software components that interpret user operations such as typing keys or speaking to generate text input for applications, and they play an important role in enabling entry of text in international locales. Unlike English text which can be entered by directly typing it in from the keyboard, entering text in languages such as Japanese or Chinese requires a more sophisticated input method framework, and J2SE 1.3.0 provides a powerful set of the tools that developers need to handle the job.

Modern text-editing components permit the display of entered text inside the context of the document in which the text will finally appear. This is called the on-the-spot input, and it has always been supported by the Java 2 Platform.

J2SE 1.3.0 adds support for a second style of input, called below-the-spot, that is popular is such countries such as China. In below-the-spot text editing, composed text is shown in a separate composition window that is automatically positioned close to the insertion point where text will be inserted.

It might be that a developer would want to change and customize the windows that appear as part of his or her input method framework. J2SE 1.3.0 gives developers full flexibility to do so by providing a new API for an input method engine Service Provider Interface (SPI). The SPI enables developers to construct their own custom input method engines to meet the needs their software.

A further example of new international locale support is that J2SE 1.3.0 can render application frames and dialog boxes to have toolbars and menu bars with a right-to-left orientation for locales such as Arabic and Hebrew.

Other Enhancements to Platform Libraries and Tools.

J2SE 1.3.0 contains select new functionality that Sun has added to the platform and Java 2 SDK tools suite in consultation with business partners and in response to input from developers. A sampling of the enhancements include: