Java Reference
In-Depth Information
6.
On the View menu, you should now see a menu item titled Java Con-
sole. Select it, and the Java Console will be displayed. You should see
output similar to that in Figure 14.6.
Netscape Navigator does not hide the Java console like Internet Explorer
does. When using Netscape, the Java console is viewed from a menu item
on the Tools menu. The exact menu item varies slightly, depending on
your version of Netscape, but it is not difficult to find. If you are using
Netscape, look on the Tools menu for a menu item that looks similar to
Display Java Console.
If the JVM being used is the Java plug-in, the console is displayed by click-
ing the Java Plug-in icon in your Windows taskbar. If you are using Windows
XP, you are probably using the Java plug-in. When you installed the J2SDK on
your machine, the Java plug-in was also installed.
When you view a Web page that contains an applet, the Java Plug-in icon
appears on the taskbar by the clock. The icon looks like a steaming cup of
coffee (the Java logo). Right-click the icon, and then select Show Console.
Figure 14.6 shows the console for the Java plug-in.
Notice in Figure 14.6 that the init() method is invoked first, followed by the
start() method, then numerous calls to paint(). To get the output in Figure 14.6,
I left the lifecycle.html page, which caused stop() and destroy() to be invoked.
Figure 14.6
Java console displays the System.out.println() output of the LifecycleDemo
applet.
Search WWH ::




Custom Search