The Java 2 SDK, Standard Edition, version 1.3.1 (J2SDK 1.3.1) is a maintenance release containing fixes for bugs identified in previous versions. For more details on these fixes, see:
See also:
Bugs Fixed in Subsequent 1.3.1 Update Releases
In addition, J2SDK 1.3.1 contains the following enhancements.
The Java virtual machines in J2SDK 1.3.1 have a new error handling mechanism that prints debug information to the screen when a crash occurs in native code.
The Html Converter is now bundled as part of the Java 2 SDK. In previous releases, including J2SDK 1.3.1 Beta, the Html Converter was available only as a separate download.
The notes below contain information that may be of interest to users of J2SDK 1.3.1, including descriptions of significant bug fixes, known bugs and workarounds, and other misellaneous tips and suggestions for using this release.
The following notes pertain to the Java virtual machine.
Workaround - Use " ulimit -s 2048" in bash shell or " limit stacksize 2048" in tcsh to limit the initial thread stack to 2 MB.
libsafe library, available from Avaya Labs Research, can cause Java 2 SDK tools to fail with the message "Invalid initial heap size: -Xms8m." Trying to use the java application launcher by setting the -Xms option explicitly will fail also. This limitation is fixed in the most recent release of the libsafe library, version 2.0.
J2SE_PREEMPTCLOSE environment variable to 1.
J2SE_PREEMPTCLOSE=1
export J2SE_PREEMPTCLOSE
This bug has been fixed in J2SDK 1.3.1. In order to enable the fix, the -Xrs command-line option must be passed to the JVM. The additional command line argument is necessary because the fix necessarily disables the J2SDK 1.3 shutdown hooks mechanism and forbids the use of the sun.misc.Signal class. For more background, please see at least the last section of the evaluation on the Bug Parade:
https://bugs.java.com/bugdatabase/view_bug.do?bug_id=432306
Another exception has been detected while
we were handling last error.
Dumping information about last error:
ERROR REPORT FILE = (N/A)
PC = 0x0x41621c7a
SIGNAL = 11
FUNCTION NAME = (N/A)
LIBRARY NAME = (N/A)
Please check ERROR REPORT FILE for
further information, if there is any.
Good bye.
This problem is seen mostly on Linux Red Hat 7.1 SMP, though theoretically it could appear on Microsoft Windows and Solaris platforms also.
Workaround - Add an explicit exit call at the end of the application's main method: Runtime.getRuntime().exit(0)
dlopen() on Red Hat. This problem is apparently due to the NFS automounter, and the problem will disappear if you explicitly mount the directory with mount -t nfs.This release has the following problems with respect to font properties.
font.properties file may fail to display some Symbol/Dingbats characters properly on some AWT components. To correct this, use this revised font.properties file to replace the one at <JAVA_HOME>/jre/lib/.
A Solaris Xserver bug can cause a system crash when an application written in the Java programming language references fonts. This problem is described in bug report 4391019. The following Solaris patches for Xserver will be available by mid-June 2001, and they may help to reduce this problem.
For Solaris 2.6: 105633-55 (Sparc) 106248-41 (Intel)
For Solaris 7: 108376-24 (Sparc) 108377-22 (Intel)
For Solaris 8: 108652-31 (Sparc) 108653-26 (Intel)
Check the SunSolve web site for availability of these patches.
The following are important changes to RMI (Remote Method Invocation) functionality in this release.
"accept" java.net.SocketPermission requirement for receiving remote calls
Due to a bug in previous J2SDK implementations, it was possible to export a remote object in a given access control context and then receive a remote call to that object over a given socket connection even if the access control context did not have "accept" java.netSocketPermission for the remote java.net.InetAddress and port of the socket connection.
This bug has been fixed; therefore, in some cases, code that exports remote objects might need to be granted more permissions that it did with previous implementations in order to function correctly.
As an example of how to grant such permissions using the default security policy file syntax, permission to accept socket connections from a host named terrier.east.sun.com can be expressed by the following permission entry (in the grant entry for the appropriate code source): <
permission java.net.SocketPermission "terrier.east.sun.com", "accept";
As described in the documentation for java.netSocketPermission , the host specification may begin with a wildcard "*"; therefore, permission to accept socket connections for any host can be expressed by the following permission entry in a given grant entry:
permission java.net.SocketPermission "*", "accept";
In previous implementations, an ObjectOutputStream instance remembered replaced objects (that is, those objects which have been returned by a call to ObjectOutputStream.replaceObject or by a class-defined writeReplace method) in such a way that a linear search was used to determine whether or not an object had a replacement. Therefore, if the number of objects replaced in a given stream was large, the overhead of the search became prohibitively expensive for each new object serialized. This bug has been fixed so that the implementation now uses a more efficient algorithm for remembering for object replacements. This fix to the object serialization implementation also benefits the scalability of object replacement during RMI argument and return value marshalling.
The following comments pertain to CORBA, RMI-IIOP, and Java IDL functionality in this release.
Work around - Change the Serializable class to use writeObject and readObject instead of writeUTF and readUTF.
Work around - Use writeObject and readObject instead of writeUTF and readUTF. Both JDK 1.3.1 as well as J2SDK 1.3 map these to CORBA wstring calls when the method parameters are Strings.
Due to this support, the J2SDK 1.3.1 and future J2SDK releases can handle class evolution. For example, if a class V shipped in J2SDK 1.3.1 evolves in a future J2SDK release, an application client (sending/receiving class V) executing on J2SDK 1.3.1 will be able to interoperate with the server (receiving/sending evolved class V) executing on the future J2SDK release, and vice versa.
However, previous release J2SDK 1.3.0 has bugs that prevent class evolution. (See, for example, bug report 4365188 on the Java Developer Connection web site.) Therefore, there will be interoperability problems when J2SDK 1.3.1 tries to send any evolved classes to J2SDK 1.3.
Bug 4178909 in the Java 2D libraries sometimes prevents applications from being displayed properly when running in 8-bit mode. This problem should only affect the first time that a application is run after either a reboot or setting the display mode to 8 bits.
There are also some bugs related to DirectDraw. If you run into a DirectDraw problem, you might consider turning off DirectDraw:
-Dsun.java2d.noddraw=true
Some display drivers will cause monitor images, including windows, to appear to re-sync or jump when DirectDraw is accessed. If you see this, check the manufacturer's web site for a newer driver that may cure the problem.
The Java platform does not support 16-color displays. If you see problems drawing graphics and GUI components on a 16-color display, try changing the color depth to 256 color mode or higher.
These notes pertain to Drag&Drop functionality in this release.
A well-constructed application will call either
DropTargetDropEvent.rejectDrop(), or both
DropTargetDropEvent.acceptDrop(int) and
DropTargetDropEvent.dropComplete(boolean) inside
DropTargetListener.drop(DropTargetDropEvent).
This will terminate the current Drag&Drop operation before the Drag&Drop subsystem can recognize and initiate another. Therefore, this change in behavior should only affect incorrectly written applications.
AWT and Swing components have inner classes that implement the Java Accessibility API and provide accessibility support appropriate for the components. However, accessibility support for the following AWT classes is not completely implemented in this release:
java.awt.TextComponent
java.awt.Menu
java.awt.MenuItem
java.awt.List
Full accessibility support for all components will be implemented in a future release of the Java 2 platform.
The following comments pertain to AWT and Swing functionality in this release.
Toolkit.getDefaultToolkit won't terminate and return the command prompt. This problem is being tracked by bug reports 4030718 and 4403762, which will be fixed in J2SDK 1.4.0 Beta.Workaround - Call System.exit() when your application is finished.
Component.getListeners() method fails to return PropertyChangeListeners. If you've added a listener with addPropertyChangeListener(), myComponent.getListeners(PropertyChangeListener.class)
will return an empty array.
JWindow objects. In particular, this bug prevents Component.requestFocus() from giving focus to components in a JWindow. This bug was fixed in update releases J2SDK 1.2.2_05 and J2SDK 1.3.0_02. However, it is not fixed in J2SDK 1.3.1.On Windows NT, the JDBC 2.0 bridge supports the ODBC 2.x and ODBC 3.x driver manager and drivers. The JDBC 2.0 bridge has been tested only with an ODBC 3.x driver manager and with both ODBC 2.x and 3.x drivers.
Merant recommends that the JDBC 2.0 bridge be used with version 3.5 or higher of Merant's DataDirect ODBC drivers.
The following security-related issues pertain to this release.
The Netscape SignTool 1.3 does not put certificates in the signature file if the code-signing certificate is self-signed, and jarsigner cannot verify a signed JAR file if the signature file doesn't contain the signer's certificate. Note: The code-signing certificate generated by the SignTool 1.3 itself is just for tesing, and it is self-signed. It is a known issue that the jarsigner cannot verify a JAR file signed by the Netscape SignTool 1.3 if the code-signing certificate is a self-signed testing certificate.
-Xbootclasspath option can be used to override the boostrap class path if necessary.However, this means that in the Java 2 SDK, application classes no longer have all permissions by default. Instead, they are granted permissions based on the system's configured security policy. This may cause some applications that write their own security code based on the original security model in 1.0/1.1 to throw an exception and not start in the Java 2 SDK. A workaround is to run these applications with the oldjava application launcher, which is documented on the reference page for the java application launcher.
policy.provider property in the Java security properties file, jre/lib/security/java.security. If you specify a non-default security policy implementation, you must put your new, non-default security properties class file on the bootclasspath. You can do so by using the -Xbootclasspath command-line option. See the Java application launcher reference page for information on this option. This will cause the policy file to be loaded by the bootstrap class loader. If the new default policy file is placed elsewhere, such as on the class path or in an extension, it will not be picked up and the default policy provided in sun.security.provider.PolicyFile will be used instead.
If you get such a message or exception, perhaps the problem is a missing terminating linefeed. One reason this may occur is that sometimes a certificate reply from a Certificate Authority (in response to a Certificate Signing Request) does not contain a terminating linefeed.
In UNIX, you can determine whether or not a file has a terminating linefeed by executing the following command:
od -xc <certificate_name>
where <certificate_name> is the name of the file containing the certificate. For example, if the file is named mycert the command would be
od -xc mycert
If the resulting output contains a "\n" (without the quotes) at the very end, there is already a linefeed at the end. If not, you can add one.
If you are unsure whether or not the certificate file contains a terminating linefeed, you can simply add one per the following paragraph (having extras never hurts) and retry the -import or -printcert command. If the command now works, the problem was the missing linefeed. If you still get an error, there is a different problem with your certificate.
To add a linefeed to the end of a Base64-encoded certificate file, open the file in any text editor, place your cursor at the very end of the file, and add a linefeed (or carriage return linefeed), for example by simply pressing the Enter key on your keyboard.
This release has the following known bugs and limitations in the networking API:
java.net.URLConnection.getInputStream don't return until the server's response is finished. This problem is described in bug 4333920. Workaround: For Apache, the workaround is to put the following in httpd.conf.
BrowserMatch "Java1\.3\..[0-1]" downgrade-1.0
HttpURLConnection.getResponseCode on the client can cause the virtual machine to crash when there are extra CRs in the HTTP header field sent by a Win98 or WinNT server. This is bug 4258697. Workaround: the stack overflow can be avoided by configuring the http server to send a HTTP 1.0 response. For Apache, this can be done by putting the following in httpd.conf.
BrowserMatch "Java1\.3\..[0-1]" downgrade-1.0
If your application uses the networking classes, it may not run reliably under Winsock 1.1. If your networking application must support Windows 95, which includes Winsock 1.1, you will want users of your application to have Winsock 2.0. (Windows NT 4.0, Windows 2000, Windows ME and Windows 98 include Winsock 2.0.) You can download the Winsock 2.0 from this address:
The following notes pertain to the Java Plug-in component in this release.
<applet> tags for launching applets and for initiating autodownload of the JRE/Java Plug-in on Microsoft Windows platforms.
The following comments pertain to documentation for this release.
An error occurs when using Japanese strings as arguments of the java command on Solaris 2.6 ja_JP.PCK locale. To workaround this problem, change line 89 /usr/java/bin/.java_wrapper from
exec $DEBUG_PROG "$prog" $opts "$@"
to
exec $DEBUG_PROG $prog $opts $@
The following problems with Traditional Chinese fonts are known exist for this release.
In the English locale, version 1.3.1 of the Java 2 SDK is supported on Windows 2000 Professional, Windows 2000 Server, Window 2000 Advanced Server. The DataCenter edition of Windows 2000 is not supported. In non-English locales, only the Professional edition of Windows 2000 is supported. Known issues with Windows 2000 include:
http://support.microsoft.com/support/kb/articles/Q142/2/71.asp
for information about resolving the problem.java.lang.Process objects. See the Microsoft Support Services web site for more information, including a fix: http://support.microsoft.com/support/kb/articles/Q271/1/82.ASP
When you install version 1.3.1 of the Java Runtime Environment, the ActiveX Control file at C:\Winnt\Downloaded Program Files\Java Runtime Environment 1.3.1 will have a status of "Damaged." This is merely a cosmetic issue, and the "Damaged" status should have no adverse affect in any situation.
Nevertheless, there is a workaround if for some reason you cannot have a status of damaged. Go to "Start -> Run" and type in "regedit". From the regedit windows, navigate to the registry key "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Code Store Database\Distribution Units\8AD9C840-044E-11D1-B3E9-00805F499D93\DownloadInformation". Double-click on the INF string and delete the highlighted string under "Value data". The ActiveX Control file will have a status of "Installed."