Running Your First Applet

Unix Instructions

Start the Applet Viewer by doing the following:

  1. Open a command line prompt, and cd to one of the directories in /usr/local/java/demo, for example
    % cd /usr/local/java/demo/TicTacToe
    
  2. Run the appletviewer on the html file:
    % appletviewer example1.html 
  3. Play Tic-Tac-Toe! The algorithm was deliberately broken so it is possible to win.

Macintosh Instructions

  1. Start the Applet Viewer by double-clicking it.
  2. Select Open… from the File menu and navigate into the java folder, then the Sample Applets folder, then the TicTacToe folder.
  3. Select the file example1.html and click on the Open button. Alternately you can drag and drop this file onto the Applet Viewer.
  4. Play Tic-Tac-Toe! The algorithm was deliberately broken so it is possible to win.

Windows Instructions

Start the Applet Viewer by doing the following:

  1. Open a DOS window, and cd to one of the directories in C:\JAVA\DEMO, for example
    C:< cd C:\JAVA\DEMO\TicTacToe
    
  2. Run the appletviewer on the html file:
    C:< appletviewer example1.htm 
  3. Play Tic-Tac-Toe! The algorithm was deliberately broken so it is possible to win.
Hot Tip: Getting Rid of that Annoying License Dialog Box

Do you know the annoying dialog box I’m talking about? I bet you do. It’s the one that comes up every time you launch the applet viewer to make you agree to Sun’s license. Do you want to get rid of it? If so make a directory called .hotjava in your java/bin directory. You won’t see it again.

Jitu99 Slot

Comments are closed.