Release Notes: Java 2 SDK Standard Edition 1.2.1_03 for Solaris

The production release of the Java 2 SDK Standard Edition (previously known as Java Development Kit (JDK) 1.2) provides a high-performance Java Virtual Machine (JVM) from Sun Microsystems which has been optimized for Solaris system software. It is supported in the Solaris 7 and Solaris 2.6 system software.

These release notes include:

The documentation that accompanies this release is intended to supplement and, where applicable, to supersede the Java 2 SDK documentation set available at:

http://java.sun.com/products/jdk/1.2/docs

Specific information regarding compatibility of Java 2 SDK releases with JDK 1.1 releases is available at:

http://java.sun.com/products/jdk/1.2/compatibility.html

Enhancements

The Java 2 SDK, Standard Edition v. 1.2.1_03 is the latest release of the Java 2 platform for the Solaris operating environment. It includes these enhancements:

Product Summary

The Java 2 platform for Solaris system software provides the new Java 2 APIs, improved stability, and an enhanced Java Virtual Machine (JVM) that provides substantially increased scalability and performance compared to earlier JDK 1.1-based releases. As a result, Java applications running with the Java 2 SDK on Solaris may realize double or higher the performance of earlier releases.

Increased performance is largely due to the scalable architecture of the JVM which has improved in bytecode execution, memory management and thread synchronization performance as a result of the following new features:

Product Notes

Viewing Java man Pages

The Java 2 SDK man pages are installed in /usr/java1.2/man . In order to be able to read them, enter

setenv MANPATH /usr/java1.2/man:$MANPATH

Per-Process File Descriptor ( fd ) Limits

The maximum recommended open fd s for Solaris 2.6 is 1024. For Solaris 7 and subsequent releases, the maximum is 65527.

UNIX® java Utilities No Longer Substitute Parameters and Expand Wildcard Characters

The UNIX versions of the java utilities no longer perform parameter substitution or wildcard expansion. Though this behavior did previously occur, it was not part of the specification and was contrary to expected UNIX behavior where shells perform a substitution or expansion before invoking a utility. This normal UNIX response can result in a behavior change when an expected wildcard or shell parameter is passed directly to a java utility (for example, not through a shell). If parameter substitution or wildcard expansion is required, use an intermediate shell to perform the expansion.

JIT Compiler Specification Command Change

The JAVA_COMPILER environment variable no longer selects the JIT compiler to be used. It can now only be used to enable or disable the default JIT compiler. The JIT compiler's default state is on. To disable the JIT compiler, set the JAVA_COMPILER environment variable to NONE . In csh , this is done by entering:

setenv JAVA_COMPILER NONE

In sh or ksh , this is done by entering:

JAVA_COMPILER=NONE
export JAVA_COMPILER

To re-enable the JIT compiler, unset the JAVA_COMPILER environment variable or set it to sunwjit . In csh , the environment variable can be unset by entering:

unsetenv JAVA_COMPILER

In sh or ksh , this is done by entering:

unset JAVA_COMPILER

Setting JAVA_COMPILER to a value other than NONE or sunwjit will result in a warning and the default JIT compiler being enabled.

Native Method Interface (NMI) Applications Not Supported by Solaris_JDK_1.2.1_03

Applications written using NMI are incompatible with Solaris_JDK_1.2.1_03, which now supports the Java Native Interface(JNI). Recognizing that the removal of NMI support is a compatibility change, provisions have been made to allow both JDK 1.1 and 1.2 to reside on Solaris systems.

For further information, refer to:

HotJava 1.1.5 Incompatible with Solaris_JDK_1.2.1_03

HotJava versions 1.1.5 and earlier are incompatible with Solaris_JDK_1.2.1_03.

Release Naming Convention

The release name for this and future releases may be displayed using java -version , and can be interpreted as follows for the Solaris_JDK_1.2.1_03 release:

Solaris_JDK_

= constant for all Sun Solaris JDK releases

1.2.1

= denotes the version of the reference JDK that this version of the Solaris JDK is compatible with, as measured by the corresponding version of the JCK.

03

= a number that increases with every new 1.2 release update.

Required Patches

The following Solaris patches are required for Solaris 2.6 for the zh_TW and zh locales:

106409-01 for SPARC

106410-01 for Intel

Installation

This section discusses problems you may encounter both during and after installation. Recommendations for dealing with such problems are provided when available.

For installation instructions, refer to README.sparc or README.i386 files that accompany this release.

Packaging Change - BASEDIR

Information in this section affects only package installations that change the top level directory where the JDK is installed using either:

- a custom admin(4) file (e.g. pkgadd -a my_admin_file ... )

or

- no admin file (e.g. pkgadd -a none ... )

    NOTE: Most installations do not specify an admin file with the -a option to pkgadd and are unaffected by this change.

The top level directory where the JDK files are installed is determined by the BASEDIR parameter in the admin file (see admin(4) and pkgadd(1) for details). Starting with this release, Java 2 SDK uses /usr as the default BASEDIR value and stores files under the directory $BASEDIR/java1.2 . For example:

$BASEDIR/java1.2/bin/java

Previous Early Access releases of Java 2 SDK used / as the default BASEDIR value and stored files under the directory $BASEDIR/usr/java1.2.

Example

Installing with an admin file that includes the line BASEDIR=/export will place the JDK files in the following locations.

For Solaris_JDK_1.2.1_03 and future releases:

/export/java1.2/bin/java

/export/java1.2/lib/...

For previous Early Access releases:

/export/usr/java1.2/bin/java

/export/usr/java1.2/lib/...

The /usr component, appended to BASEDIR in earlier releases, was unnecessary and has been removed in this release.

Font Packages

During installation, you may get warnings indicating that font packages, optional for Solaris, have not been installed:

Warning! It is strongly recommended that the following font package be installed for all locales: SUNWi1of

Warning! It is strongly recommended that the following font packages be installed to support locales (other than ISO8859-1 locales) as needed: SUNWi2of SUNWi2rf SUNWi4of SUNWi4rf SUNWi5of SUNWi7of SUNWi7rf SUNWi9of SUNWi9rf SUNWjxcft SUNWkcoft SUNWcttf SUNWhttf SUNW5xfnt

    NOTE: The font packages listed in the warning messages cover all language locales, including those that may not be on your Solaris product CD. Do not be concerned if you cannot find all the packages listed in the warning message. Install only the ones you can find on your CD.

Running with Both Java 2 SDK and JDK 1.1

The /usr/java symbolic link points to the JDK that is the default on that system. JDK 1.1 currently installs in /usr/java1.1 . This release of Java 2 SDK will install by default in
/usr/java1.2 . The /usr/java symbolic link will continue to point to 1.1 after installation of 1.2 unless manually changed.

To make Java 2 SDK the default, do the following as root:

# /usr/bin/mv /usr/java /usr/java.oldlink

# /usr/bin/ln -s /usr/java1.2 /usr/java

After you do this there will be some symbolic links in /usr/bin, created by the JDK 1.1 installation that no longer point to anything. These links are for tools that are part of the JDK 1.1 distribution but not part of the Java 2 SDK distribution.

After you have changed the /usr/java symbolic link, applications using NMI will fail, but keeping both JDKs on the system makes the workaround trivial and supportable. Applications that require JDK 1.1 can still be run as long as you provide the full path to the correct invocation script; e.g. /usr/java1.1/bin/java. You may also need to explicitly set the CLASSPATH, LD_LIBRARY_PATH and JAVA_HOME environment variables in your execution environment.

To restore JDK 1.1 as the default JDK, do the following, do the following as root:

# /usr/bin/mv /usr/java.oldlink /usr/java

Troubleshooting

libthread panic or I/O exception

If you get an error message mentioning a libthread panic or an I/O exception, it is possible that the file descriptor limit has been reached.

The Java2D demo is an example of an application that requires a higher file descriptor limit than the default. The number of file descriptors can be increased in the C shell ( csh ) using the command:

limit descriptors 256

The number of file descriptors can be increased in the Bourne shell ( sh ) or the Korn shell ( ksh ), using the command:

ulimit -n 256

Solaris patch installation

If you get a message such as the following, refer to the README.sparc or README.i386 for information on Solaris patches.

You must install a Solaris patch to run this version of the Java runtime environment.

    NOTE: It is essential that you install the appropriate Solaris patches in order for the JDK to function properly. For a list of recommended and required patches, see README.sparc or README.i386 . If there is a libthread patch required for your version of Solaris software, it should always be installed after the other appropriate patches in the readme .

Out of Memory

If you get a message that reads ***Out of memory, exiting*** , check to see that the application is linking with libthread.so before libjvm.so . In this event, messages will appear in the early phase of VM initialization

To avoid this problem, link libthread before libjvm or set LD_PRELOAD to include libthread.so . In csh , type:

setenv LD_PRELOAD libthread.so

In sh or ksh , type:

LD_PRELOAD=libthread.so export LD_PRELOAD

    NOTE: For more information, see the ld.so.1(1) man page .

Fixed Bugs

These bug fixes are particularly important.

4173641
The FileDialog wasn't localized.

The JDK now correctly sets NLSPATH to retrieve localized messages for libXm . FileDialog strings can now be displayed in English for non-English locales.

4176857, 4176525
InputEvent.getWhen() was returning wrong event's timestamp

The timestamp on InputEvents was being incorrectly returned by the InputEvent.getWhen() method.

4208402
Regression: socket writes of >64k resulted in ArrayIndexOutOfBoundsException

A socket write of more than 64k elements produced an ArrayIndexOutOfBoundsException .

4211144
Core dump during garbage collection: (JWS, possible unload/reload class issue).

Calling a simple servlet using

http://somehost/servlet/ForwardServlet?forward=DateServlet

then touching DateServlet.class , calling the url again while running jdb remotely and issuing manual gc commands to collect garbage, the Java 2 JVM dumped core the second time in the cs.forward() call during garbage collection.

4211447
JIT did an incorrect optimization in loop.

This was a SPARC-only problem.

4213209
VM panic occurred when using jni_AttachCurrentThread on a heavily-loaded MP system.

A bug in the JNI attach calls were causing the VM to panic. On a heavily-loaded MP, there is a window during which the VM will fail if a garbage collection is required.

4218090
Japanese fonts didn't work in Java 2D or Swing applications.

Japanese characters were not visible in Java2D or Swing applications which use Java2D fonts in the Japanese locale.

4222921
SEGV occurred when using reflection to assign null to primitive type field.

An exception should have raised in this instance.

4223915
Hostname resolution failed on NIS+ networks

Hostname resolution using java.net package classes such as InetAddress was not working correctly on NIS+ networks.

4230366
Could not use scalable TrueType fonts in zh_TW.BIG5 locale

Default font selections for the locale zh_TW.Big5 for Solaris 2.6 were incorrect.

4238115
Solaris 2.6 did not support zh_TW.BIG5 locale scalable fonts.

As there are no scalable Big 5 fonts for Solaris 2.6, Chinese characters were not visible in Swing components.

4235974
Could not display Korean characters in Swing applications.

Install these patches to display Korean characters in Swing components which use the ko locale on Solaris 7:

107078-08 for SPARC

107079-08 for Intel

Open Bugs

This section documents those open bugs deemed significant.

4165781
Setting LC_CTYPE=en_US or iso_8859_1 makes OpenWindows applications strip characters to 7 bits.

Both LC_CTYPE=en_US and iso_8859_1 should be 8-bit clean.

4170221
Underlined text is displayed extremely slowly on a non-local host.

When you set the DISPLAY environment variable to a host other than the one running the virtual machine, underlined text in a network browser displays at a much slower rate than text that is not underlined.

4210230
Significant JDK 1.2 text rendering performance regression from 1.1

Text rendering on Solaris platforms without DGA (Direct Graphics Access) support is significantly slower with JDK 1.2 than with 1.1. This applies to Ultra 5, Ultra 10, Solaris Intel platforms and remote display.

4231741, 4210664
Thread.sleep behaves erratically if system time is changed.

The server hangs when the system time changes (for instance, when Daylight Savings Time starts).

Workaround: Avoid changing the time when such sleeps are in progress.

4238673
When integrating a Java application which includes utilities with native library components, dialog boxes display as blank windows.

While the mouse was moving in the application's windows, a large number of these messages occurred:

*** Calling native method notifyAll a slow way! ***

*** Calling native method wait a slow way! ***

Workaround: For a Java application to display correctly under these circumstances, add
-verbose to the java command line and redirect to /dev/null .

4239074
serialver fails with fatal error on SPARC Solaris 2.6 ISO8859-1 European.

serialver -show dialog is unlocalized.

Workaround: Use Solaris 7.

4241326
SUNWloc wrong for Korean L10N package.

ko.UTF-8 should be taken out as there is no support for UTF-8 Solaris locale. When ko.UTF-8 is supported, this string should be entered into the SUNWloc value in pkginfo .

4242352
Swing on Solaris 7/ko locale cannot recover when IM dumps.

htt_server core dumps when some specific Korean-Chinese (Hanja) words are entered.

4244232
ko.UTF-8 cannot display Korean in Swing, AWT Canvas.

There is no scalable font for this locale in either Solaris 2.6 or 7. Without the Canvas widget, AWT can display Korean.

4244233
Cannot input Korean in Swing OpenWindows File dialogs.

Korean filename cannot be entered on either Solaris 2.6 or 7. The input method recognizes the typed characters, but does not place them in the filename text field.

Workaround: Use CDE instead of OpenWindows.

4244236
ko.UTF-8 : blank korean characters in clock applet.

The clock applet in the demo displays blanks instead of Korean characters for the time and date. This does not happen for the ko locale.