This document helps in troubleshooting problems that might occur with applications that are developed using the release of Java Platform, Standard Edition Development Kit 6 (JDK 6 release or Java SE 6 release). In particular, this guide addresses possible problems between the application and the Java HotSpot virtual machine.
See Appendix D, Summary of Tools in This Release for a list of changes to the troubleshooting tools for this release of Java SE compared with the previous release.
This document is currently focused on providing information about the tools and options available for diagnostics and monitoring. It does not yet include information on garbage collection or diagnosing performance issues.
For help in troubleshooting applications that use the Java SE desktop technologies, see the following guide: Troubleshooting Guide for Java SE 6 Desktop Technologies.
Java HotSpot Virtual Machine
The Java HotSpot virtual machine provides a runtime environment for instructions that were generated by a Java compiler. Java SE provides two implementations of the Java virtual machine: client VM and server VM. These two systems are essentially two different just-in-time compilers interfacing with the same runtime system.
-clientcommand-line option when launching an application.
-servercommand-line option when launching an application.
The default implementation depends on the platform and the class of the machine. For full details, see Ergonomics in the 5.0 Java[tm] Virtual Machine.
More information on the Java Hotspot VM can be found at the following locations:
Who Should Use This Guide
The target audience for this document comprises developers who are working with Java SE 6, as well as support or administration personnel who maintain applications that are deployed with Java SE 6.
This document is intended for readers with a high-level understanding of the components of the Java Virtual Machine, as well as some understanding of concepts such as garbage collection, threads, native libraries, and so on. In addition, it is assumed that the reader is reasonably proficient on the operating system where the Java SE application is installed.
How This Guide Is Organized
The first chapter of this document introduces the various diagnostic and monitoring tools, utilities, options, and system properties that are available for troubleshooting in Java SE 6. The chapter also provides a summary of tools and options by category. Note that tool availability depends on the platform: Solaris Operating System (Solaris OS), Linux, or Windows. Read this chapter to get acquainted with the capabilities of the utilities and options that are available.
The second chapter describes the troubleshooting tools in detail. The chapter also provides a list of the operating system tools and utilities that may be used in conjunction with the Java SE utilities and options. Finally, the chapter describes in detail how you can develop new tools using the APIs provided in the Java SE platform.
The third through fifth chapters suggest procedures to try when you encounter a problem with memory leaks, crashes, or hangs.
The sixth chapter deals with applications that use signal handlers.
The last chapter provides suggestions on what to try before submitting a bug report, guidance on how to submit a report, and suggestions on what data to collect for the report.
Finally, there is an appendix for each of the following reference areas: environment variables, command line options, details about the format of the fatal error report, and a list of tools in this release.
Feedback and Suggestions
Troubleshooting is a very important topic. If you have feedback on this document or if you have suggestions for topics that could be covered in a future version, use the Feedback Form. Fill in the relevant fields and click Send.
Note - Do not use this feedback form for support requests; they will not be answered. Technical support is provided at the Services site for Sun Developer Network.
Troubleshooting information for J2SE 1.5 is described in the Java 2 Platform, Standard Edition 5.0, Troubleshooting and Diagnostic Guide (PDF) .
In addition, the following online troubleshooting resources are available:
Sun provides a wide range of support offerings, from developer technical support for software developers using Sun development products or technologies, to support for production systems in enterprise environments. Two commercial support options are summarized here: developer technical support and Java mulitplatform support.
Developer technical support is aimed at developers who are using Sun development products or technologies, and who are working at the source-code level of their own applications.
This support offering includes response to technical questions, diagnostic and troubleshooting help, suggestions for best practices, bug escalation, and more.
The Java multiplatform support offering is designed to provide production support for shipping releases of Java technology-based applications using Sun's Java runtime environment (JRE) and distributed to end users in heterogeneous environments. This support offering helps to optimize application performance and to reduce time spent keeping applications up and running.
Community support can often be obtained using the Java Technology Forums. The forums provide a way to share information and locate solutions to problems. The forums are located here.
The following table describes the typographic conventions that are used in this book.
||The names of commands, files, and directories, and onscreen computer output||
||What you type, contrasted with onscreen computer output||
||Placeholder: replace with a real name or value||
The command to remove a file is
|AaBbCc123||Book titles, new terms, and terms to be emphasized||
Read Chapter 6 in the User's Guide.
A cache is a copy that is stored locally.
Do not save the file.
Note: Some emphasized items appear bold online.
Shell Prompts in Command Examples
The following table shows the default UNIX system prompt and superuser prompt for shells that are included in the Solaris OS. Note that the default system prompt that is displayed in command examples varies, depending on the Solaris release.
|Bash shell, Korn shell, and Bourne shell||
|Bash shell, Korn shell, and Bourne shell for superuser||
|C shell for superuser||
Related Third-Party Web Site References
Third-party URLs are referenced in this document and provide additional, related information.
Note - Sun is not responsible for the availability of third-party web sites mentioned in this document. Sun does not endorse and is not responsible or liable for any content, advertising, products, or other materials that are available on or through such sites or resources. Sun will not be responsible or liable for any actual or alleged damage or loss caused or alleged to be caused by or in connection with use of or reliance on any such content, goods, or services that are available on or through such sites or resources.
Many people contributed technical expertise and other input to this guide: Alan Bateman (major contributor), Tim Bell (major contributor and reviewer), Stephen Bohne, Mandy Chung, Stuart Clements, Uday Dhanikonda (responsible engineering manager), Christine Dorffi, Daniel Fuchs, Jim Holmlund (major contributor and reviewer), David Holmes, Karen Kinnear, Peter LaPierre, James C. Lee, Antonia Lewis (writer), Teresa London, Srinivas Madishetty, Keith McGuigan, Kelly O'Hair, Coleen Phillimore, Leif Samuelsson, Bill Situ, A. Sundararajan, Jesse Suen, Adam Wisnewski.
The following table tracks the changes in version of this guide.
|December 2006||Original version.|
|January 2007||New feedback form.|
|May 2007||Minor corrections.|
|August 2007||Corrections to tool support by platform.|
|November 2008||Addition of the Java VisualVM tool. Corrections to changed link locations.|