Compiling Java Applications on osf1/mason

First use an editor, such as pico, to enter your program.

Note: Your program must be named with the extension .java AND the name of the program must be the name of the class.

To compile, type:
javac filename.java

If there are errors, you will have to go back into the editor to fix them. The bytecode will be saved in a file called filename.class

To run your program, type:
java filename

Click here to return to the IT 108 class page


Copyright © 1999-2002 All Rights Reserved