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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.