JavaTM 2 SDK, Standard Edition, version 1.4.2
Version 1.4.0 of the Java 2 SDK, Standard Edition was a major feature release. The features listed below are those introduced in 1.4.0 (since 1.3). Version 1.4.2 is a maintenance release and introduces the minor enhancements and changes (since 1.4.1) listed at Enhancements and Changes in J2SE 1.4.2 on the web site.
The full list of features, including features brought forward from previous versions, is available at Guide to Features.
- Java 2 Platform
- XML Processing
- New I/O APIs
- Java 2DTM technology
- Image I/O Framework
- Java Print Service
- Drag and Drop
- Logging API
- JavaTM Web Start Product
- Long-term Persistence of JavaBeansTM Components
- JDBCTM 3.0 API
- Assertion Facility
- Preferences API
- Chained Exception Facility
- Endorsed Standards Override Mechanism
- Java Virtual Machines
- Networking Support, Including IPv6
- Java Naming and Directory InterfaceTM (JNDI)
- CORBA, Java IDL, and RMI-IIOP
- JavaTM Platform Debugger Architecture
- JavaTM Plug-in Product
- Collections Framework
- Regular Expressions
- Java Native Interface
The JavaTM API for XML processing has been added to the Java 2 Platform. It provides basic support for processing XML documents through a standardized set of Java Platform APIs.
The new I/O (NIO) APIs provide new features and improved performance in the areas of buffer management, character-set support, regular-expression matching, file I/O, and scalable network I/O.
java.security.certpackage that allow you to build and validate certification paths (also known as "certificate chains").
java.security.PolicyAPI handles Principal-based queries, and the default policy implementation supports Principal-based
grantentries. Thus, access control can now be based not just on what code is running, but also on who is running it.
Java 2D includes many new features including: performance improvements, support for hardware acceleration for offscreen images, a pluggable image I/O framework, a new print service API, and several new font features.
The Java Image I/O Framework provides a pluggable architecture for working with images stored in files and accessed across the network. It offers substantially more flexibility and power than the current APIs for loading and saving images.
New features include the ability to set savepoints in a transaction, to keep
result sets open after a transaction is committed, to reuse prepared statements,
to get metadata about the parameters to a prepared statement, to retrieve
keys that are automatically generated, and to have multiple result sets open
at one time. There are two new JDBC data types, BOOLEAN and DATALINK, with
the DATALINK type making it possible to manage data outside of a data source.
This release also establishes the relationship between the JDBC Service Provider
Interface and the Connector architechture.
The JavaTM Print Service is a new Java
Print API that enables client and server applications to:
Changes to the AWT package center on improving the robustness,
behavior, and performance of programs that present a graphical
A new focus architecture replaces the previous implementation and
addresses many focus-related bugs caused by platform inconsistencies,
and incompatibilities between AWT and Swing components.
The new full-screen exclusive mode API supports high performance
graphics by suspending the windowing system so that drawing can be
done directly to the screen; a benefit to applications like games,
or other rendering-intensive applications.
is now enabled by new graphics environment methods that
indicate whether a display, keyboard, and mouse can be supported in a
graphics environment. The ability to disable native frame decorations
is now available for applications which need to take full control of specifying how a frame will look; when
enabled this prevents the rendering of a native titlebar, system menu, border, or other
native operating system dependent screen components.
The oft-requested mouse wheel, with a scroll wheel in place of
the middle mouse button, is enabled with new built-in Java support
for scrolling via the mouse wheel. Also, a new mouse wheel listener
class allows customization of mouse wheel behavior. The AWT package
has been modified to be fully 64-bit compliant and now runs on
Solaris machines with 64-bit and 32-bit addresses.
Many new features have been added to Swing. The new spinner component
is a single line input field that allows the user to select a number or
a value by cycling through a sequence of values using a tiny pair of up/down arrow buttons.
The new formatted text field component allows formatting of dates,
numbers, and strings, such as a text field that accepts only decimal money values.
The Windows look and feel implementation is updated to track features
available in the 2000/98 versions.
A new drag and drop architecture provides seamless drag and drop
support between components as well as an easy way to implement drag and
drop in your customized Swing components - writing a couple of methods
which describe the particulars of your data model is all that is required.
Swing's progress bar component has been enhanced to support an
indeterminate state; rather than showing the degree of completeness,
the indeterminate progress bar uses constant animation to show that
a time-consuming operation is occurring. Due to great customer demand,
the tabbed pane component has been enhanced to support scrollable tabs.
With this feature enabled, if all the tabs will not fit within a single tab run,
the tabbed pane component will display a single, scrollable run of tabs, instead
of wrapping the tabs onto multiple runs. The popup and popup factory classes,
which were previously package private, have been exposed and made public so
that programmers may customize or create their own popups. The new focus
architecture is fully integrated into Swing.
Swing has added support for data transfer between
applications. A drag and drop operation is a data transfer request
that has been specified by a gesture with a
graphical pointing device. In the case of copy/paste, data transfer
is often initiated with the keyboard. The ability
to transfer data takes two forms: Drag and drop (DnD) support and
clipboard transfer via cut/copy/paste. See
Swing Data Transfer.
The Java Logging APIs facilitate software servicing and maintenance
at customer sites by producing log reports suitable for analysis by
end users, system administrators, field service engineers, and
software development teams. The Logging APIs capture information
such as security failures, configuration errors, performance bottlenecks,
and/or bugs in the application or platform.
The Java Web Start product is a new application-deployment technology
that is bundled with J2SE 1.4.0.
With Java Web Start, you launch applications simply by clicking on a
Web page link. If the application is not present on your computer,
Java Web Start automatically downloads all necessary files. It then
caches the files on your computer so the application is always ready to
be relaunched anytime you want -- either from an icon on your
desktop or from the browser link. And no matter which method you
use to launch the application, the most current version of the
application is always presented to you.
The new persistence model is designed to handle the process of
converting a graph of beans to and from a persistent form.
The new API is suitable for creating archives of graphs of
JavaBeans components as textual representations of their properties.
Enhancements to the JavaBeans Component API.
The JDBC 3.0 API, comprised of packages java.sql and
javax.sql, provides universal data access from the Java programming
language. Using the JDBC 3.0 API, you can access virtualy any data
source, from relational databases to spreadsheets and flat files. JDBC technology also provides a common base on which tools and alternative interfaces
can be built.
An assertion facility has been added to the Java 2 Platform.
Assertions are boolean expressions that the programmer believes to be true
concerning the state of a computer program. For example, after sorting a
list, the programmer might assert that the list is in ascending order.
Evaluating assertions at runtime to confirm their validity is one of the most
powerful tools for improving code quality, as it quickly uncovers the
programmer's misconceptions concerning a program's behavior.
This new feature is a simple API for managing user preference and
configuration data. Applications require preference and configuration
data to adapt to different users, environments and needs. Applications
need a way to store, retrieve, and modify this data. This need is met
by the Preferences API. The Preferences API is intended to replace
most common uses of class java.util.Properties, rectifying many
of its deficiencies, while retaining its light weight.
New features include the ability to set savepoints in a transaction, to keep result sets open after a transaction is committed, to reuse prepared statements, to get metadata about the parameters to a prepared statement, to retrieve keys that are automatically generated, and to have multiple result sets open at one time. There are two new JDBC data types, BOOLEAN and DATALINK, with the DATALINK type making it possible to manage data outside of a data source. This release also establishes the relationship between the JDBC Service Provider Interface and the Connector architechture.
An endorsed standard is a JavaTM API defined through a standards process other than the Java Community ProcessSM (JCPSM). Because endorsed standards are defined outside the JCP, it is anticipated that such standards may be revised between releases of the Java 2 Platform. In order to take advantage of new revisions to endorsed standards, developers and software vendors may use the Endorsed Standards Override Mechanism to provide newer versions of an endorsed standard than those included in the Java 2 Platform as released by Sun Microsystems.
This new facility provides a common API to record the fact that one exception caused another, to access causative exceptions, and to acess the entire "causal chain" as part of the standard stack backtrace, ensuring that preexisting programs will provide this information with no additional effort on the part of their authors.
The Java virtual machines in this release include several enhancements.
The Classic virtual machine is no longer shipped as part of the Java 2 SDK.
- Signal-chaining facility.
- 64-bit support on SolarisTM-SPARCTM platform edition.
- Error-reporting mechanism.
- New command-line option for performing additional Java Native Interface (JNI) checks.
- New facility for logging garbage-collection events.
This release includes performance enhancements in many areas of the platform. See Performance Enhancements for a description of some of them.
New features include support for IPv6 in TCP- and UDP-based applications, and support for unconnected/unbound sockets, allowing more flexible socket creation, binding, and connection. A mechanism called Java Secure Socket Extension provides encryption for data sent via sockets, and a new class,
URI, allows URI construction and parsing without the presence of a protocol handler. The FTP Protocol Handler has been overhauled for conformity to current standards. The default character set is now UTF8, and APIs have been added to enable other character schemes.
A new class,
NetworkInterface, allows enumeration of interfaces and addresses, and JNDI DNS SP Support in
InetAddressenables applications to configure a pure Java name service provider. TCP out-of-band data provides support for legacy applications; a UDP Connection function registers destination address with the OS, enabling asynchronous errors to be returned on the UDP socket; and full SOCkS V5 and V4 TCP support includes auto-negotiation with the proxy for which version to use. In addition, there are improvements to streaming, request and response headers processing, and error handling.
Server-side Stack Traces Now Retained in Remote Exceptions
The RMI runtime implementation will now preserve the server-side stack trace information of an exception that is thrown from a remote call, in addition to filling in the client-side stack trace as it did previous releases. Therefore, when such an exception becomes accessible to client code, its stack trace will now contain all of its original server-side trace data followed by the client-side trace.
Service Provider Interface for
Certain static methods of
java.rmi.server.RMIClassLoadernow delegate their behavior to an instance of a new service provider interface,
java.rmi.server.RMIClassLoaderSpi. This service provider object can be configured to augment RMI's dynamic class loading behavior for a given application. By default, the service provider implements the standard behavior of all of the static methods in
RMIClassLoader. See the class documentation of
RMIClassLoaderSpifor more details.
Dynamic Server Host Name
java.rmi.server.hostnameproperty can now be dynamically updated to indicate that future exports should use a new host name. Therefore, the new host name value will be contained in the stub for an object that is exported after the property is updated.
This release has several changes and enhancements to the serialization API, including
- Support for deserialization of objects that are known to be unshared in the data-serialization stream.
- Support for a class-defined readObjectNoData method.
- Important bug fixes.
See JNDI Enhancements for details.
The ORB shipping as part of Java 2 Platform now includes a Portable Object Adapter (POA) functionality. An ORB makes it possible for client(s) to make method invocations on the objects being supported by server(s) executing on the same or different machine(s). ThePOA functionality allows programmers to construct object implementations that are portable between different ORB products, provide support for objects with persistent identities, and much more. Other new features include Portable Interceptors, Interoperable Naming Service, GIOP 1.2 support, Dynamic Management of Any values, and new tools that support a persistent naming service and other features. To learn more about the new features in Java IDL and RMI-IIOP between J2SE v.1.3 and J2SE v.1.4, link to Changes in CORBA Features Between J2SE 1.3 and 1.4.
Full Speed Debugging Support
The Java HotSpot[TM] virtual machine now uses "full-speed debugging". In the previous version of HotSpot, when debugging was enabled, the program executed using only the interpreter. Now, the full performance advantage of HotSpot Technology is available to programs running with debugging enabled. The improved performance allows long running programs to be more easily debugged. It also allows testing to proceed at full speed and the launch of a debugger to occur on an exception.
This feature has been added to allow a class to be updated while under the control of a debugger.
EventRequestsnow have the capability of specifying an instance filter, which restricts the events generated by the request to those in which the currently executing instance is the object specified.
Support For Debugging Other Languages
The Java Platform Debugger Architecture has been extended so that non-Java programming language source, which is translated to Java programming language source, can be debugged in the future.
A request can now be made to control target VM termination notification, allowing clean shutdown synchronization
Unicode 3.0 Support
Character handling in J2SE 1.4 is based on version 3.0 of the Unicode standard. This affects the Character and String classes in the java.lang package as well as the collation and bidirectional text analysis functionality in the java.text package.
Support for Thai and Hindi
Thai and Hindi are now supported in all areas of functionality. See the Supported Locales document for complete information on supported locales and writing systems.
The class java.util.Currency was introduced so that currencies can be referenced independent of locales. There are new methods on java.text.NumberFormat and related classes to specify the currency for formatting monetary values.
Java Plug-in 1.4 offers the following new features: support of HTTPS through Java Secure Socket Extension (JSSE) rather than the browser; enhanced applet caching so that other files, such as GIF, JPEG, AU, etc., can be cached as part of the download in addition to JAR and class files; applet persistence so that applets may persist across browser page changes; various applet-compatibility enhancements to allow most JDK 1.1 applets to run seemlessly in Java 2; and on Microsoft Windows platforms, support in Java Plug-in for launching applets using the <APPLET> tag.
Version 1.4 also provides access to the DOM via standard, w3c-defined interfaces; assertion and logging support; applet usability enhancements, including a customizable progress bar for applet loading; and enhanced options in the Java Console to allow dynamic reconfiguration of proxy settings, the policy file, etc., while the applet is running.
The collections framework has several enhancements in Java 2 SDK 1.4, including a marker interface to advertise random access, an identity-based (rather than equality-based) Map, insertion-order-preserving Map and Set implementations, and several new algorithms for manipulating and returning values from lists. See Collections Framework Enhancements for details.
New features include support for:
- Mnemonic tab navigation on a JTabbedPane
- Text editing by assistive technologies
- Accessibility of HTML components
- Accessibility of Swing Actions
- List navigation using the first letter of list items
- Component roles DATE_EDITOR, FONT_CHOOSER, GROUP_BOX, SPIN_BOX, STATUS_BAR
- Properties to indicate the presence of a screen magnifier or screen reader, or to specify assistive technologies to load into the Java virtual machine
New package java.util.regex contains classes for matching character sequences against patterns specified by regular expressions.
A new, efficient method for generating prime numbers with no need for the caller to specify a certainty has been added to class java.math.BigInteger.
Certain reflective operations, specifically java.lang.reflect.Field, java.lang.reflect.Method.invoke(), java.lang.reflect.Constructor.newInstance(), and Class.newInstance(), have been rewritten for higher performance. Reflective invocations and instantiations are several times faster than in previous releases.
A few changes have been made to JNI in v 1.4. First, the version number has been incremented and the specification of JNI_OnLoad updated accordingly. Second, JNI has been enhanced to reflect a new feature of the java.nio package: direct buffers. The contents of a direct buffer can, potentially, reside in native memory outside of the ordinary garbage-collected heap. Finally, the new Invocation Interface routine AttachCurrentTreadAsDaemon allows native code to attach a daemon thread to the virtual machine; this is useful when the VM should not wait for this thread to exit upon shutdown. See JNI Enhancements for more on these enhancements.
See Tool Changes for details on the changes summarized here.
Copyright © 2002 Sun Microsystems, Inc. All Rights Reserved.