Our Programming Environment:
Things you should know about ...
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.
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 SampleProgramOf 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.
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.htmlOnce 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:
TestSomeClass.java
. You can use
your driver to test SomeClass in $t00 as follows:
$ javac -classpath .:$t00 TestSomeClass.java $ java -classpath .:$t00 TestSomeClassOf 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.
$ more $t00/filename.extAs always, with appropriate permissions, you may simply change into the other directory and view the file directly from there.