CS 451 Programming Paradigms
Java Info

Compiling and Interpreting

To compile a .java file that contains at least one Java class, use the Java compiler (javac). This will create a file of the same name with the final extension changed from .java to .class. This file contains the bytecodes for the virtual machine. To run a java program simply execute the virtual machine (java) on the file that contains the function "main". Do not include an extension on that file when you give it as the argument to the virtual machine. For example,

22% javac Item.java Queue.java Test.java

23% ls

Item.java Item.class Queue.java Queue.class Test.java Test.class

24% java Test

... execution commences ...

To use a java program in a browser, create an applet. You then create an HTML file that contains links to the applet code. Finally you can link that HTML file into any other HTML file. See the text for more details on this procedure.

If you wish to view an applet without using a browser, again create the HTML file that contains links to the applet code and execute the following:

appletviewer <your HTML file>.html


Available Platforms

The following is a list of Linux boxes which have JDK 1.2 with Swing.

=================================================================
gig-0                 2 P2 450, 1024                Linux Debian             
gig-1                 2 P2 450, 1024                Linux Debian             
gig-2                 2 P2 450, 1024                Linux Debian             
gig-3                 2 P2 450, 1024                Linux Debian             
gig-4                 2 P2 450, 1024                Linux Debian             
gig-5                 2 P2 450, 1024                Linux Debian             
gig-6                 2 P2 450, 1024                Linux Debian             
gig-7                 2 P2 450, 1024                Linux Debian             
gig-8                 2 P2 450, 1024                Linux Debian             
gig-9                 2 P2 450, 1024                Linux Debian             
portico               2 PPro 200, 128               Linux Debian             
faceplant             2 PPro 200, 128               Linux Debian             
marmrat               2 PPro 200, 128               Linux Debian             
dumbell               Dell Dimension                Linux Debian             
onion                 Net Express Pentium           Linux Debian             
jam                   Net Express Pentium           Linux Debian             
scooby                P                             Linux Debian             
shadar                P 133, 64                     Linux Debian             
spider                P 133, 64                     Linux Debian             
roach                 P 133, 64                     Linux Debian             
dragonfly             P 133, 64                     Linux Debian             
malkier               P 66, 64                      Linux Debian             
sutra                 P150, 64                      Linux Debian             
foo                   P150,64                       Linux Debian             
servo                 P2 300, 64                    Linux Debian             
captncrunch           P2 300, 64                    Linux Debian             
mercy                 P2 300, 96                    Linux Debian             
umwert                P2 400, 128                   Linux Debian             
lanfear               P2 400, 128                   Linux Debian             
sunset                P2 400, 128                   Linux Debian             
nobby                 P2 400, 128                   Linux Debian             
lessing2              P2 400, 128                   Linux Debian             
pathos                P2 400, 64                    Linux Debian             
mail                  P2 450, 128                   Linux Debian             
mashadar              P2 450, 128                   Linux Debian             
tigger                P2 500, 128                   Linux Debian             
ishamael              P200, 32                      Linux Debian             
cocopops              P200, 64                      Linux Debian             
cthulu                P200, 64                      Linux Debian             
sleet                 PPro 200, 128                 Linux Debian             
crash                 Pentium                       Linux Debian             
granola               Pentium                       Linux Debian             
lisa                  Pentium                       Linux Debian
=================================================================


Note, there are other machines with JDK installed, but these are the ones that are guaranteed to work *well* and that are the correct versions to use Swing and run the ThermSimulator application.


[ Back to CS451: Language Links ]