ARL Web Database Course, February 11, 1998
Compiling Java


Compiling and Viewing Applets

  1. Copy these two files to your "webhome" directory (you may want to make a subdirectory for Java;

     cp ~njm/public_html/Java/HelloWorld/MoreHelloApplet.java .
    and
     cp ~njm/public_html/Java/HelloWorld/MoreHelloApplet0.html .

  2. Compile the java file by typing the command
    javac MoreHelloApplet.java 
    resulting in the file MoreHelloApplet.class.

  3. View in your local browser with the URL
    http://osprey7.npac.syr.edu:3768/arlspring98-docs/vxx/Java/MoreHelloApplet0.html

Compiling and Running Applications

  1. Copy this file to your local disk

     cp ~njm/public_html/Java/lang/RollDice.java .

  2. Compile the java file by typing the command
    javac RollDice.java 
    resulting in the file RollDice.class.

  3. Run the .class file by typing the command
    java RollDice

Other Java examples are found on the NPAC Java Resources Page.


Nancy McCracken at the Northeast Parallel Architectures Center.