Java Technology  «Prev 

Java AppletViewer and the Java interpreter

Both the Java AppletViewer and the Java interpreter execute Java programs. The real distinction lies in the fact that the Java interpreter does nothing more than interpret Java bytecode.
The AppletViewer takes on another level of responsibility by providing a graphical framework for applets to reside in. The AppletViewer certainly must interpret Java bytecode but it also provides support for the graphical needs of applets.
Like the AppletViewer, Web browsers that support Java also have a Java interpreter built into them that is used to execute Java applets. Also like the AppletVie wer, Web browsers must provide graphical support to applets.
Neither the AppletViewer nor Java-supported Web browsers are capable of running stand-alone Java applications, however. The Java interpreter takes on this job.

AppletViewer

AppletViewer is a standalone command-line program from Oracle to run Java applets. Appletviewer is generally used by developers for testing their applets before deploying them to a website.
As a Java developer, it is the preferred option for running Java applets that do not involve the use of a web browser. Even though the appletviewer logically takes the place of a web browser, it functions very differently from a web browser. The appletviewer operates on HTML documents, but all it looks for is embedded applet tags; any other HTML code in the document is ignored. Each time the appletviewer encounters an applet tag in an HTML document, it launches a separate appletviewer window containing the respective applet. The only disadvantage to using the appletviewer is that it will not show how an applet will run within the confines of a real web setting. Since the appletviewer ignores all HTML code except applet tags, it does not even attempt to display any other information contained in the HTML document.