
1. Set the CLASSPATH variable

   Example in Windows: 
   Create a seperate directory for classes.
   >mkdir classes 

   Set the classpath.
   >set CLASSPATH=c:awl\src\chapter2\viewer\classes;%CLASSPATH%
   
2. Compile all files

   Example: 
   >javac -d c:awl\src\chapter2\viewer\classes *.java

3. Run the ImageViewerApplet
   
   i. appletviewer imviewer
   ii. Use a java enabled browser
  
4. Run ImageViewerApplet as a stand-alone application

   a. Using the images from a local directory
  
       i. Create a directory called "images" under ..\chapter2
      ii. Copy jpeg or gif images to this directory
     iii. Run the application under ..\chapter2
          >java ImageViewerApplet

   b. Using the images from a jar file 
       
       i. Create the "images" directory.
          and copy jpeg or gif images to "images" directory
      ii. Create a jar file with all the images from "images". 
          >jar cf im1.jar images
     iii. Run the application
          >java ImageViewerApplet im1.jar
