How to compile and run Java programs at CCS

On Solaris, at CCS:
Please use at least Java 1.4.  You can find it in

  /usr/j2se/bin

You might need to put this on your path in your .software file.

It is recommended that you use now the SUN javac compiler. It has been improved and should work well for your needs.

man javac
gives you documentation about the compiler.
which javac
tells you where it lives.

To run:

java Main
provided Main contains the main() method.

Compiling Java files that have been created by DemeterJ.

In some homeworks you get generated Java files to take the tedious work from you. The Java files live in a directory that has usually the name gen. Contents of generated java code.

To compile and run the provided Java classes, you need to put the file at http://www.ccs.neu.edu/research/demeter/DemeterJava/rt.jar into your CLASSPATH. This jar file contains the runtime support package (edu.neu.ccs.demeter.*), as well as DJ (edu.neu.ccs.demeter.dj.*) and the AP Library (edu.neu.ccs.demeter.aplib.*, edu.neu.ccs.demeter.aplib.cd.*, and edu.neu.ccs.demeter.aplib.sg.*).

The same file is also at: /proj/demsys/demjava/rt.jar for users of CCS Solaris machines. To compile them, use:

javac *.java
To run the program, use:
java Main < program.input
where program.input contains an object description that is given as input to your Java program. Study class Main.java to see how the parser is invoked.

Prepared by Karl Lieberherr and Doug Orleans.