
|
||||||
Since Java files are really text files which are compiled into bytecode and run by the Java Virtual Machine (JVM), there are several options for writing your programs this semester. Remember that links to other Useful Downloads (e.g., programming editors) and Unix Information and Editors are located on the Help Page.
|
||||||
| Return to top | ||||||
|
||||||
| Due to
their graphical nature, Swing programs cannot be run through a telnet
window. It is possible to obtain a similar program known as an XWindows
client that handles graphics, but unless you have a high-speed connection
at home, using one to connect to NICE and run programs will be impractical.
There are thus four choices for writing and running Swing programs
for this course; they are as follows: (1) Compile and run your programs on the Linux Workstations at the Science Center. These computers, in the first 3 rows of Room B-14, run XWindows as part of their operating system (Linux), and can therefore run Swing programs already. This is probably the easiest solution, if you can come to campus. (2) Download the Java SDK 1.5 from Sun, linked below, and install it on your home computer. If you have already done this, you are all set - the JDK will do a very fine job of running Swing. This application comes pre-installed on Apple computers running OS X. If you get messages on Windows that the java and javac commands aren't recognized, see the info from Sun on how to set your PATH variable (http://java.sun.com/j2se/1.5.0/install-windows.html) - you can test the commands by typing 'java -version' at a command prompt. You should see information on your Java version. If you use a programming editor like PFE (Programmer's File Editor), there is a menu button at the top to get a command prompt to compile. (3) Get an X-Windows server , which allows you to connect to the FAS system from home and run Swing programs, something a regular telnet client cannot do. We have not been able to locate a free XWindows server, although you can purchase X-Win32 for a student price of $60 from Starnet Communications (http://www.starnet.com). (4) Get a Linux Live (bootable) CD and run it to connect to NICE. One of the better ones is Knoppix (http://www.knoppix.com), which does automatic hardware detection and set-up. You can purchase a Knoppix CD for a few dollars, or download the disk image and burn it to a CD yourself for free. Then set up your computer to boot from a CD, put this in your CD drive, and restart the computer. It will come up in Linux (without installing anything on your hard drive!). Once there, open a terminal window and type 'ssh -Y username@nice.harvard.edu' and it will begin an X-Windows session. Some sections may ask that you turn in your Swing programs on a portable media (CD, USB drive, etc.) for grading. |
||||||
| Return to top | ||||||
|
||||||
| JAVA
SDK'S: These are the nuts and bolts of Java - this used to be known as the JDK (Java Development Kit); then Sun renamed it the Java SDK (Software Development Kit); now it seems to be back to JDK. The release we will use is 1.5.0. Macs have Java already included, although it may not be version 1.5. You can check the version of a Java installation by typing the command 'java -version' at a command prompt. The links below go to Apple's download page for version 1.5, as well as other documentation for Java on Macs. |
||||||
Windows:
NOTE that you do NOT need the NetBeans package or J2EE, just the J2SE SDK. Select JDK 5.0 Update 14 (the third item on the list)!!
|
||||||
Macintosh:
|
||||||
IDE'S: These programs can provide convenience if you wish to invest in them. You will see that Sun encourages the use of an IDE (Integrated Development Environment); at your level of programming, it truly won't make that much difference, and in fact, it is preferable that you write all of your own code to better learn how. It becomes more important when you begin to write complex programs that use numerous classes (coming in CSCI E-119 or E-160). Sun has an IDE available, named Java Studio. If you are interested in JBuilder or CodeWarrior, check the Harvard Coop - they'll have the educational versions at a discount. You should be aware that we will be checking your programs to be sure that YOU are writing the code, and not having an IDE do it for you. |
||||||
|