Applets Start a MS-DOS command window. For PCs running Windows NT (as in the Weber Lab), choose Start/Programs/Command Prompt from the Windows NT desktop. For PCs running Windows 95, choose Start/Shut Down/Restart in MS-DOS Mode from the Windows 95 desktop. Now, change to the directory of your choice from within the command window. This been done, now you can execute your applet just by starting the Java Applet Viewer which comes by default with JRE. When using this way of execution, your source code should look like below: EduApplet.java.
Schedule and Assignments > PSA7 > How do I get appletviewer to work on my home computer?
|
AppletViewer is a standalone command-line program from Sun to run Java applets. Appletviewer is generally used by developers for testing their applets before deploying them to a website.
![Examples Examples](http://c861135.r35.cf2.rackcdn.com/HelloWorldApplet.jpg)
As a Java developer, it is a preferred option for running Java applets that do not involve the use of a web browser. Even though the applet viewer logically takes the place of a web browser, it functions very differently from a web browser. The applet viewer 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 applet viewer encounters an applet tag in an HTML document, it launches a separate applet viewer window containing the respective applet. The only drawback to using the applet viewer is that it will not show how an applet will run within the confines of a real web setting. Because the applet viewer ignores all HTML codes except applet tags, it does not even attempt to display any other information contained in the HTML document.
An Applet viewer creates an environment that mocks the look and feel of a stand-alone program with no interaction with a web browser, even though it does involve a browser to run an applet.
Appletviewer is included with Sun's JDK package, but not with Sun's JRE package. The Java development kit GCJ also has its own version of appletviewer, called 'gappletviewer'.
External links[edit]
- The Java Website
- Java SE Downloads, JDK download page
- JDK Development Tools, includes detailed documentation of appletviewer and other Java tools
Retrieved from 'https://en.wikipedia.org/w/index.php?title=AppletViewer&oldid=932450480'