The appletviewer Browser

The appletviewer tool runs Java programs that require a web browser and are presented as part of an HTML document. It takes an HTML document as a command-line argument, as in the following example:

appletviewer NewAuctions.html

If the argument is a web address instead of a reference to a file, appletviewer will load the HTML document at that address. For example:

appletviewer http://www.javaonthebrain.com

Figure B.1 displays an applet loaded from this page, a site developed by cartoonist and Java game programmer Karl Hörnell.

Figure B.1. Viewing Java web applets outside of a browser.

When an HTML document is loaded ...

Get SAMS Teach Yourself Programming with Java™ in 24 Hours, FOURTH EDITION now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.