CS3134: William’s Recitation 2 (thanks to Andrew Howard for Andy’s Recitation 1)

Useful Programs to Have and Useful Websites

Many of these resources can be found on the resources pages but I will include them here since they are covered in recitation.


You have a few options for your development environment. These vary from the easiest setup to more complicated setups. The tradeoffs? Some would argue that what you lose in ease of setup, you more than gain in ease of development. It is entirely up to you and your comfort level.

All deveopment in a terminal on cunix...

1.   Log on newcunix.cc.columbia.edu using SSH, TeraTerm, or, PuTTy. (On a mac, use ssh from the terminal)

2.   Type “Emacs filename.java” where filename is the name of the file you will be editing. Text-based Emacs will load within your terminal, ready to edit your files. (alternatively, you can use any plain text editor like vim, etc.)

3.   To compile your program, back on the command line, type “javac filename.java” where filename is the name of the file

4.   To run, type “java filename”, note you do not use the .java or .class extension

5.   When you are finished with your project submit by typing “~cs3134/bin/submit”. This will submit everything in your directory and send you an email confirmation.

Or, export your display and use GUI emacs from cunix...

1.   Start X-Win32. (on a mac, start X11)

2.   Log on newcunix.cc.columbia.edu using SSH, TeraTerm, or, PuTTy. Be sure to turn on IP X forwarding before you log in as outlined in the X-Win32 setup. (on a mac, use ssh -X)

3.   Type “Emacs filename.java” where filename is the name of the file you will be editing. An emacs window should pop up on your desktop ready for use. If this doesn’t happen, there is a mistake in step 1 or most likely 2.

4.   In Emacs, under “Options”, choose “Syntax Highlighting”. This will allow for useful coloring.

5.   To compile your program, back on the command line, type “javac filename.java” where filename is the name of the file

6.   To run, type “java filename”, note you do not use the .java or .class extension

7.   When you are finished with your project submit by typing “~cs3134/bin/submit”. This will submit everything in your directory and send you an email confirmation.

Or, develop locally and move files to cunix for submit...

1.   Make sure you have the J2SE 1.4.2 SDK installed. (typing “javac” at a command prompt should give you the help file if everything is ok.)

2.   Using a text editor (wordpad, notepad, etc. NOT MSWORD!) or an IDE (you could use NetBeans, or Eclipse) write your program and save it somewhere on your local harddrive.

3.   To compile your program, back on the command line, type “javac filename.java” where filename is the name of the file

4.   To run, type “java filename”, note you do not use the .java or .class extension

5.   When you are satisified that your code is correct, FTP it to your cunix account using a file transfer protocol (FTP) program. ACIS has software here.

6.   Test your code on cunix before you submit! It must work on cunix. We will only grade files that compile (and run) on cunix.

7.   When you are finished with your project submit by typing “~cs3134/bin/submit”. This will submit everything in your directory and send you an email confirmation.


Example Code