java.lang.instrument and Java Virtual Machine Tool Interface (JVM TI)
The Java 2 Platform Standard Edition Development Kit 5.0 (JDK 5.0) is a feature release of the Java platform. It contains new features and enhancements in many functional areas.
This document summarizes known bugs, workarounds, and other important issues to be aware of in this release.
For further information, refer to the following links:
To determine the version number of your J2SE software, use the following command:
java -version </blockquote>
For platform-dependent issues and bugs in particular J2SE technologies, search this page for the platform name ("Windows", "Linux", or "Solaris TM ").
The following notes apply to use of this release on Linux platforms.
See also the Troubleshooting section of the Linux Installation Notes.
The following notes pertain to the Java HotSpot virtual machines (VMs) in this release.
-Xincgc option now invokes the concurrent garbage collector instead of the train garbage collector. The concurrent garbage collector is a low-pause garbage collector that generally provides better performance than the train garbage collector. The train garbage collector will not be supported in 1.5 (now known as 5) and beyond. For issues regarding garbage collection options, please use your usual support or feedback channels. Details on garbage collection tuning are available at Tuning Garbage Collection with the 5.0 Java TM Virtual Machine .
Exception java.lang.OutOfMemoryError: requested <size> bytes. Out of swap space?
If you see this symptom, consider increasing the available swap space by allocating more of your disk for virtual memory and/or by limiting the number of applications you run simultaneously. You can also decrease your usage of memory by reducing the value of the
-Xmx flag, which limits the size of the Java object heap.
This issue is being tracked in bug 4697804.
The compiler in the server VM now provides correct stack backtraces for all "cold" built-in exceptions. For performance purposes, when such an exception is thrown a few times, the method may be recompiled. After recompilation, the compiler may choose a faster tactic using preallocated exceptions that do not provide a stack trace. To disable completely the use of preallocated exceptions, use this new flag:
Tomcat hangs after 24 hours (1310 iterations) on Solaris with both
-client -Xcomp flags. This problem is fixed in Tomcat/Apache versions 4.1.30 and 5.0.17.
For information about NIO, see the NIO documentation.
The following notes pertain to issues with Security functionality in this release.
ocsp.responderURL security property. A certificate's Authority Information Access extension is not examined.
SecureRandom implementation uses
/dev/random to seed itself, if available. This approach can improve the startup time of cryptographic applications considerably, but can also cause delays if the kernel entropy pool is empty. Solaris 8 users experiencing this problem should ensure that they have patch 112438-01 (SPARC) or 112439-01 (x86) installed. It is also possible to edit the
<java.home>/lib/security/java.security file to specify a different URL for seeding. Note that if the URL cannot be opened, the implementation defaults to the pure-Java seeding implementation.
SSL_DHE_DSS_* cipher suites to encode DSA signatures incorrectly when those signatures were used as part of a DSA server key exchange message.
|Use the correct behavior. (Interoperable with JSSE 1.0.3)
|Use the "broken" behavior. (Interoperable with JSSE 1.0, 1.0.1, and 1.0.2)
For backwards compatibility, the SunJSSE provider in JDK 1.4 and above also has this property; its default value is true.
|Use the correct RFC 2246 behavior
|Use the incorrect behavior.
Given that most servers accept either message type, for interoperability with servers using SunJSSE in J2SDK 1.4.0 the current default is false:
|J2SDK 1.4.1, 1.4.2, and JDK 5.0 (1.5.0)
See JAXP Release Notes for known bugs and issues in this release.
If you select a time zone that doesn't observe daylight saving time (e.g., Tokyo Standard Time) on an installation of a Microsoft Windows operating system, that selection may turn off the global system setting "Automatically adjust clock for daylight saving changes." Under this setting, the Java runtime detects the platform time zone in the GMT offset format (e.g., "GMT+09:00"), not as a time zone ID (e.g., "Asia/Tokyo"). To fix this installation problem, take the following steps after the installation (unless you intend to turn off the setting):
Open Date/Time in Control Panel.
On the Time Zone tab, choose a time zone that observes daylight saving time (e.g., "(GMT-08:00) Pacific Time (US & Canada); Tijuana"), select the "Automatically adjust clock for daylight saving changes" check box, and press the Apply button.
Choose your time zone back and press the OK button.
For information on changes to Serialization functionality for this release, see Serialization Changes in J2SE 5
A processor's floating-point unit (FPU) usually has a control word which affects its behavior on certain floating-point events, such as overflow (generating a result too large to represent as a finite value), underflow (generating an especially small result), and divide by zero (e.g. 1.0/0.0). Java precisely defines the outcome of these events; Java uses the default returns values from the IEEE 754 floating-point standard. For example, overflow and divide by zero generate either positive or negative infinity. Other language environments may allow different outcomes from such events; for example, instead of returning an infinity, dividing by zero could generate an exception and stop the program. If a program with different floating-point semantics is called from a Java program, the called program may alter the FPU control word to implement its own semantics. However, such a called program should restore the FPU control word to its previous value. If the called program does not restore an altered FPU control word, and Java program could terminate with an improper floating-point exception after the external program exited. However, some commercial dlls are known not to restore the FPU control word to its previous value when they return to the calling thread. If your program terminates with a floating-point exception, you should consider this possibility as the source of the problem.
See bug 4644270 as an example of this issue.
The Java Native Interface specification has been unified into a single document. In previous releases, the 1.2 and 1.4 enhancements were separated out from the 1.1 specification. The JNI spec also incorporates clarifications to standard UTF-8 encoding and "Java modified UTF-8" encoding. (See RFE 4915107.)
Java Management Extensions (JMX TM ) technology was added to the J2SE platform in version 5.0. Details of the JMX API that is included in J2SE 5.0 can be found in the JMX documentation.
For information on changes to RMI functionality for this release, see RMI Changes in J2SE 5
For 5.0, the JDBC ODBC bridge is not supported for AMD-64 processors on any operating system, as ODBC drivers are not available.
equals() method in
AudioFormat.Encoding now compares the name, and not the class instance. Applications that compare
Types with "
==" are advised to use the
equals() method instead. (See RFE 4925483.)
MidiSystem.getTransmitter() were modified to preferably return an external MIDI port's
Transmitter. Only if no external port is installed, a
Sequencer instance will be returned. (See RFE 4934509.)
MidiSystem.getSequencer() maintains backwards compatibility by returning a
Sequencer object which is connected to the default
Synthesizer. This behavior can be changed in 3 ways:
Synthesizer in the
sound.properties file. (See RFE 4776511.)
Sequencer from the default
Synthesizer, get a list of
Transmitters from the
Sequencer, and close them all. (See RFE 4931387.)
MidiSystem.getSequencer(boolean) with parameter
false. (See RFE 4931400.)
On Microsoft Windows platforms, Java 2D functionality in J2SE 1.4.1 and beyond is implemented using DirectDraw and Direct3D for various offscreen rendering functions. Bugs in some Direct3D drivers have been known to cause problems in previous releases. If you encounter rendering or crashing problems while running a graphical application, consider updating your driver. The latest drivers for a particular card are usually available on the website of your computer, video card, or video chip manufacturer, such as http://www.nvidia.com .
You can also try launching your application with the following command-line flag set:
This forcibly disables our use of Direct3D and avoids any Direct3D-specific problems.
You can also try the following flag:
This flag disables our use of DirectDraw and Direct3D for offscreen images (such as the Swing back buffer).
If problems persists, try launching the application with this flag:
This flag disables our use of DirectDraw and Direct3D completely and thus avoids any problems you may be seeing associated with our use of those APIs and their respective drivers on your system.
The following notes pertain to AWT functionality in this release.
See bug report 4632143 for more information.
requestFocus to set the focus on a component such as setting the focus on a text field when starting up an applet this may not work when running Netscape 7 on Solaris. In order to fix these problems, release J2SE 5 should run with an XEmbed-enabled version of Mozilla, such as Mozilla v1.5 or higher for Linux. On Solaris, Sun Mozilla at least version 1.4 or higher is required. Using this release with an older version of Mozilla or with Netscape is not sufficient.
java.awt.Window.locationByPlatform property to true. When the
locationByPlatform property is true, and a new window is created with a 0,0 location, the underlying window manager tiles the window according to its own logic. Otherwise, AWT won't know whether the window was put at 0,0 intentionally or was just unspecified and the window will be placed at the upper-left-hand corner of the screen.
See bug report 4102292 for more information.
The problem is caused when the installation of those programs replaces the Asian
Riched32.dll file with the English version of the same file. The problem can be corrected by replacing
Riched32.dll with the Asian version.
See the AWT release notes for more information.
The following note pertains to Swing functionality in this release.
See bug report 4607364 and the detailed Swing release notes for more information.
Internet Explorer will hang if an applet displays a UI component in its
destroy() method and a user triggers
destroy() by pressing the Back or Refresh button in the brower.
Java Update provides the latest updates of J2SE Runtime Environment to end users in a proactive and automatic manner. In release 5, the customizable user options are now configurable through the "Update" tab in the new Java Control Panel.
The server VM is not installed with the stand-alone Windows JRE installation, nor is it installed with the public JRE installed with the JDK installation. If you want the server VM to work with the public JRE, you will need to create the directory
and copy the server VM from
The -source 5 option is required for compiling with the new language features. (Option -source 1.5 is a synonym.) This is the default starting with the 5.0 Beta 2 release. Notice that for the Beta 1 release, -source 1.4 was the default.
The -target 5 option is the default and generates class files compatible with VMs for 5.0. (Option -target 1.5 is a synonym.) Specify the -target 1.4 option to generate class files that are compatible with 1.4 or 5 VMs. Notice that for the Beta 1 release, -target 1.4 was the default.
Concurrent javac processes may lead to crash. This is an infrequent bug. Workarounds are either to use the -client jvm, or do only one build at a time. See bug report 5074555 .
In the Solaris
java command for version 1.2.2, -Xhprof was a synonym for -Xrunhrof. The -Xhprof option has not been supported since 1.3.
These interfaces are new in 5.0.
If a subclass of
ClassLoader passes a null class name to one of the
java.lang.ClassLoader.defineClass methods (or uses the deprecated form which does not supply a class name) and
java.lang.instrument is enabled with the
-javaagent option to the java command or a JVM TI agent has enabled the
ClassFileLoadHook event, the VM will crash. See bug report 5096167 for more details.
At the lowest level of JPDA, JVMDI has been replaced with Java Virtual Machine Tool Interface (JVMTI). JVMTI is a new native programming interface for use by development and monitoring tools. It provides both a way to inspect the state and to control the execution of applications running in the Java virtual machine (VM). JVMTI is intended to provide a VM interface for the full breadth of tools that need access to VM state, including but not limited to: profiling, debugging, monitoring, thread analysis, and coverage analysis tools.
This interface has been deprecated. The Java Virtual Machine Tool Interface (JVMTI) will replace it in the next major release.
This interface has been deprecated. The Java Virtual Machine Tool Interface (JVMTI) will replace it in the next major release.
The following notes pertain to jconsole functionality in this release:
The Javadoc tool has no known crash, hang or other major bugs. The complete list of Javadoc fixed bugs and new features are documented at What's New in Javadoc 5.0.
Oracle is reviewing the Sun product roadmap and will provide guidance to customers in accordance with Oracle's standard product communication policies. Any resulting features and timing of release of such features as determined by Oracle's review of roadmaps, are at the sole discretion of Oracle. All product roadmap information, whether communicated by Sun Microsystems or by Oracle, does not represent a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. It is intended for information purposes only, and may not be incorporated into any contract.