Documentation Contents
Java Platform, Standard Edition Deployment Guide
Contents    Previous    Next

22 Java Console, Tracing, and Logging

This topic describes the Java Console, a debugging aid that redirects any System.out and System.err to the console window. The console is available for applets running with Java Plug-in and applications running with Java Web Start.

This topic includes the following sections:

22.1 Debugging Options in the Java Console

Figure 22-1 shows the options that are available in the Java Console for debugging applets and Java Web Start applications.

An option is selected by typing its letter or number when the Java Console window has focus. The options are described in Table 22-1.

Table 22-1 Java Console Debugging Options

Key Description

c:

Clears the Java Console window.

f:

Triggers finalization on the objects in the finalization queue and then displays memory information. Memory refers to the current heap size used by the JRE. Free is the available memory that is free in the heap. The percent (xx%) is the free memory as a percent of the total heap size.

g:

Triggers garbage collection and displays memory information as described above.

h:

Displays help message, which is being described here.

l:

Displays a list of the cached ClassLoader objects in the Java Plug-in. Classes are cached to avoid having to load them again when returning to previously-visited pages. When a page is visited the first time, a ClassLoader object will be created and all of the classes that are downloaded will be cached in that object. These objects are created and cached according to their codebase. To identify a ClassLoader object, the "classloader list" displays the codebase for that object. Additional information displayed with a ClassLoader object includes zombie, cache and info. zombie = true indicates that a ClassLoader object is not being used (i.e., the applet is not currently loaded on the page). cache = true indicates that the applet should be cached, while false indicates that the applet will be destroyed when the page is left. info is a value used for debugging.

m:

Displays heap memory usage as described above.

o:

Triggers logging, which directs output from the Java Plug-in Console to a log file.

p:

Reloads the proxy configuration.

q:

Causes the Java Console to disapper from the main screen.

r:

Reloads the policy configuration.

s:

Prints out the system properties. This is mostly for debugging.

t:

Prints out all the existing thread groups. The first group shown is Group main. ac stands for active count; it is the total number of active threads in a thread group and its child thread groups. agc stands for active group count; it is the number of active child thread groups of a thread group. pri stands for priority; it is the priority of a thread group. Following Group main, other thread groups will be shown as Group <name>, where name is the URL associated with an applet. Individual listings of threads will show the thread name, the thread priority, alive if the thread is alive or destroyed if the thread is in the process of being destroyed, and daemon if the thread is a daemon thread.

x:

This removes (destroys) all ClassLoader objects in the cache.

Modified jar files will be downloaded from the server when a page with an applet is refreshed or revisited if you first do this: type "x" in the Java Console to clear the Classloader cache.

0-5:

This sets the trace-level options as described in Section 22.2, "Tracing and Logging"Section 22.2, "Tracing and Logging.".


22.2 Tracing and Logging

Tracing is a facility to redirect any output in the Java Console to a trace file. Similar to tracing, logging is a facility to redirect any output in the Java Console to a log file using the Java Logging API.

Contents    Previous    Next

Oracle and/or its affiliates Copyright © 1993, 2015, Oracle and/or its affiliates. All rights reserved.
Contact Us