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 were covered in my recitation.
- Javadoc
documentation for JDK 1.4.2. This is the most useful tool that you
could ever use. Includes detailed explanations of all of Java’s core
classes.
- SSH This is a free SSH client and Secure
File Transfer Client for Windows. Download: SSHSecureShellClient-3.2.5.exe
(or you can use TeraTerm
or PuTTy)
- X-Win32
This will allow you to export you display from Newcunix
so you can remotely use graphical linux tools
Walk Through for Logging On and Developing on Newcunix
You do not need to develop on newcunix but you
must be sure that your code will run on it. These instructions are by no means
the only way to do this. This is for Windows users.
1.
Log on newcunix.cc.columbia.edu
using SSH, TeraTerm, or, PuTTy.
3.
At the command prompt (in your SSH window) type “export DISPLAY=IPADDRESS:0”
where IPADRESS is you address. There are many ways of finding this, the easiest
being selecting the DISPLAY tab in X-Win32.
4.
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 2 or most likely 3.
5.
In Emacs, under “Options”,
choose “Syntax Highlighting”. This will allow for useful coloring.
6.
To compile, on the command line,
type “javac filename.java”
where filename is the name of the file
7.
To run, type “java filename”,
note you do not use the .java or .class extension
8.
When you are finished with your
project submit by typing “/opt/ACISsubmit/bin/submit
cs3134”. This will submit everything in your directory and send you an
email confirmation.
You do not need to remotely develop on newcunix,
you could use NetBeans, or Eclipse and develop on your own machine.
Example Code
- Hello.java This is basic
Hello World code. It demonstrates the minimum needed to run some Java
code.
- PrintNumbers.java
This code takes a series of numbers as command in arguments and then
prints them out. It demonstrates command line input, converting strings to
integers and back again, string concatenation, and the .length method for
arrays. Example run: “java Print Numbers 3 4 5”
- SaveKeyboard.java
This code takes input from the keyboard and saves it to a file. It demonstrates
reading from the command line, writing to files, try, catch, finally, and
exceptions. Try entering comma separated data for use with ParseFile.java
- ParseFile.java
This code reads from a file splits it up and prints it out. It
demonstrates reading from files, and stringtokenizer