1. Browsers When testing Java applets, it is a good idea (and often quite instructive) to test using different browsers, in addition to the appletviewer tool. And there is no shortage of browsers. On the PC, your choices may include Firefox, Internet Explorer, and Opera. On the Linux machine the choices may include Firefox, Opera, Konqueror and Galeon.
  2. Permissions In order to make any of your files publicly readable, which you will want to do from time to time, change to the relevant directory and give the rather mysterious command
    chmod 644 *
    
    to make all files in that directory readable, or replace the wildcard character with a blank-space-separated list of specific files to make just those files readable.
  3. Running a program in another account under Linux Assume the class in SampleProgram.java has a main function, and that the program for which this is the "starting point" has been previously compiled in the directory represented by the alias $t00. Suppose as well that all the class files resulting from the compile are located in that directory and have been given world read permission. Then you can test this program directly from your own account with this command:
    $ java -classpath $t00 SampleProgram
    
    Of course, with appropriate permissions, you may simply change into the other directory and run the program directly from there without the need to supply a classpath.
  4. Running an applet in another account under Linux Assume the applet in SampleApplet.java has been previously compiled in $t00. Suppose as well that all the class files resulting from the compile have been given world read permission. And, assume as well that a suitable SampleApplet.html file is also present in $t00. Then you can test this applet directly from your account with this command:
    $ appletviewer file://$t00/SampleApplet.html
    
    Once again, with appropriate permissions, you may simply change into the other directory and run the applet directly from there.

    Also note the following two variations:

  5. Testing a class in another account Suppose the file SomeClass.class exists in $t00 and you have written a test driver called TestSomeClass.java. You can use your driver to test SomeClass in $t00 as follows:
    $ javac -classpath .:$t00 TestSomeClass.java
    $ java  -classpath .:$t00 TestSomeClass
    
    Of course, when you do this you must be sure that you don't have a file of your own called SomeClass.class "in the way". So, make sure your own SomeClass.class (if any) is "out of the way", either by running your test from a directory that does not contain your version of this file, or by temporarily renaming your version of the file or moving it to another directory.
  6. Viewing a source code file (or any textfile) in another account In this case a command like the following will display the file one screen at a time:
    $ more $t00/filename.ext
    
    As always, with appropriate permissions, you may simply change into the other directory and view the file directly from there.