logo
CS 414: Introduction to Operating Systems
Summer 2000
MTWR 10:00-11:15, 211 Upson
 
 
How to use Java in CSUGLab
 

We generally advice you to use jdk1.2 instead of visual j++ to do the java programming. You can use J++ editor to edit your java programs, but we believe it is better to use jdk1.2 to compile and run your java programs. We fear you may face portability problems. So this web page is meant to tell you how to use jdk1.2 in the CSUGLab.


1. Open a command shell. And change directory to where you have the java files.

2. jdk1.2 in the Undergraduate Lab can be found in the path g:\jdk\jdk1.2\. To use jdk1.2, open a CMD shell and set the PATH to point to the jdk1.2 binaries with the command

set PATH=g:\jdk\jdk\bin;%PATH%.

You can then run all the jdk1.2 binaries directly from the shell.

3. You can also permanently set this path by adding it to the path variable in your NT environment. (click on MyComputer).

4. Use javac to compile your java programs. eg. javac test.java.

5. Use java to run java programs. eg. java test (remember java test.class is wrong!!!).

6. Remember that jdk1.2 is CASE SENSITIVE!!!


Using Java 2 in UNIX is also very simple.

1. You need to set path to the jdk1.2.2 binaries. Use the following command.
setenv PATH /usr/local/jdk1.2.2/bin:$PATH

2. Use javac and java as you would use anywhereelse.

 
 
Questions? Contact ramasv@cs.cornell.edu or ranveer@cs.cornell.edu
cornell logo