JDK for Solaris Developer's Guide

Core Libraries

Lang and Util Packages

For a synopsis of java.lang and java.util enhancements, refer to the documentation at http://java.sun.com/j2se/1.5.0/docs/guide/lang/enhancements.html.


For a synopsis of added networking features, refer to the documentation at http://java.sun.com/j2se/1.5.0/docs/guide/net/enhancements-1.5.0.html.


This release of J2SE offers significant enhancements for security. It provides better support for security tokens, support for more security standards (SASL, OCSP, TSP), improvements for scalability (SSLEngine) and performance, plus many enhancements in the crypto and Java GSS areas. For details see the documentation at http://java.sun.com/j2se/1.5.0/docs/guide/security/index.html.


Enhancements are as follows:

Refer also to the documentation at http://java.sun.com/j2se/1.5.0/docs/guide/intl/index.html.

Improved Support for Environment Variables

The System.getenv(String) method is no longer deprecated. The new System.getenv() method allows access to the process environment as a Map<String,String>. Refer to the documentation at http://java.sun.com/j2se/1.5.0/docs/api/java/lang/System.html#getenv(java.lang.String).


The new ProcessBuilder class provides a more convenient way to invoke subprocesses than does Runtime.exec. In particular, ProcessBuilder makes it easy to start a subprocess with a modified process environment (that is, one based on the parent's process environment, but with a few changes). Refer also to the documentation at http://java.sun.com/j2se/1.5.0/docs/api/java/lang/ProcessBuilder.html.


An interpreter for printf-style format strings, the Formatter class provides support for layout justification and alignment, common formats for numeric, string, and date/time data, and locale-specific output. Common Java types such as byte, java.math.BigDecimal , and java.util.Calendar are supported. Limited formatting customization for arbitrary user types is provided through the java.util.Formattable interface.

Refer to the documentation at http://java.sun.com/j2se/1.5.0/docs/api/java/util/Formatter.html.


The java.util.Scanner class can be used to convert text into primitives or Strings. Since it is based on the java.util.regex package, it also offers a way to conduct regular expression based searches on streams, file data, strings, or implementors of the Readable interface. Refer to the documentation at http://java.sun.com/j2se/1.5.0/docs/api/java/util/Scanner.html.


Support for generics, annotations, enums, and convenience methods has been added. Also, java.lang.Class has been generified. Refer to the documentation at http://java.sun.com/j2se/1.5.0/docs/guide/reflection/enhancements.html.

JavaBeans Component Architecture

A subclass of PropertyChangeEvent called IndexedPropertyChangeEvent has been added to support bound properties that use an index to identify the part of the bean that changed. Also, methods have been added to the PropertyChangeSupport class to support firing indexed property change events. Refer to the documentation at http://java.sun.com/j2se/1.5.0/docs/guide/beans/index.html.

Collections Framework

The Collections Framework has been enhanced in the following ways:

Refer to the documentation at http://java.sun.com/j2se/1.5.0/docs/guide/collections/index.html.

Java API for XML Processing (JAXP)

For details refer to JSR 206 or to the documentation at http://java.sun.com/j2se/1.5.0/docs/guide/xml/jaxp/index.html.

Bit Manipulation Operations

The wrapper classes (Integer, Long, Short, Byte, and Char) now support common bit manipulation operations which include highestOneBit, lowestOneBit, numberOfLeadingZeros, numberOfTrailingZeros, bitCount, rotateLeft, rotateRight, reverse, signum, and reverseBytes.


The numerical functionality provided by the libraries has been augmented in several ways:

Refer to the documentation at http://java.sun.com/j2se/1.5.0/docs/guide/math/index.html.


The new java.lang.instrument package provides services that allow Java programming agents to instrument programs running on the Java virtual machine. The intrumentation mechanism is modification of the bytecodes of methods.


Support has been added to handle enumerated types which are new in version 1.5.0. The rules for serializing an enum instance differ from those for serializing an ordinary serializable object: the serialized form of an enum instance consists only of its enum constant name, along with information identifying its base enum type. Deserialization behavior differs as well--the class information is used to find the appropriate enum class, and the Enum.valueOf method is called with that class and the received constant name in order to obtain the enum constant to return.

Refer to the documentation at http://java.sun.com/j2se/1.5.0/docs/guide/serialization/index.html.

Concurrency Utilities

The java.util.concurrent, java.util.concurrent.atomic, and java.util.concurrent.locks packages provide a powerful, extensible framework of high-performance, scalable, thread-safe building blocks for developing concurrent classes and applications, including thread pools, thread-safe collections, semaphores, a task scheduling framework, task synchronization utilities, atomic variables, and locks. The addition of these packages to the core class library frees the programmer from the need to craft these utilities by hand, in much the same manner that the Collections Framework did for data structures. Additionally, these packages provide low-level primitives for advanced concurrent programming which take advantage of concurrency support provided by the processor, enabling programmers to implement high-performance, highly scalable concurrent algorithms in the Java language to a degree not previously possible without resorting to native code.

Refer to JSR 166 and to the documentation at http://java.sun.com/j2se/1.5.0/docs/guide/concurrency/index.html.


The java.lang.Thread class has the following enhancements:

Monitoring and Management

This release of J2SE offers significant enhancements for monitoring and management for the Java platform.