Java SE contains several tools to assist in program development and debugging, and in the monitoring and troubleshooting of production applications. The set of tools includes
aptthe annotation processing tool
javacthe Java to bytecode compiler
jvisualvmthe Java VisualVM all-in-one graphical and extensible troubleshooting tool
jconsolethe Java SE Monitoring and Management application
jstattools to observe the behavior of running Java programs
Other tools are also included, such as tools for CORBA, RMI, and security management.
Documentation for all these tools can be found in the Java SE Tools documentation. See also the Java SE Troubleshooting guide, which offers assistance for the debugging of memory problems, deadlocks, and crashes.
You wouldn't believe the amount of testing that Java SE receives, but still, bugs happen. You can search for existing problems and report new ones on the Bug Database website.