![]() Princeton University |
Computer Science 441 |
alias gjc java -ms12m gjc.Main setenv CLASSPATH .:/usr/local/gj/classesThis makes gjc a command for compiling Java and GJ programs. The CLASSPATH is the path used by the compiler for looking up any compiled classes that you may need. The defaults given here include the directory you are running the command from and /usr/local/gj/classes. Feel free to add other directories to your classpath if you start developing your own libraries.
Compile your program by typing
gjc MyProg.javaThat will not only compile that file, but any other file needed by your program (provided it can be found using the info in CLASSPATH).
To run your program type
java MyProgpresuming that MyProg is the class whose main method is the one you want to execute.
The best place to get information on gj is the GJ homepage, which has links to documentation on how to use the system and a tutorial. GOOD LUCK.