Contents:
Note that even if you choose to work at home, you will still need to run
add 6.170 student-setup.pl
once on Athena.
Thus, go to http://java.sun.com/j2se/1.5.0/download.jsp and make sure that you follow the link labeled Download J2SE SDK. Instead of downloading JDK 5.0 bundled with Netbeans (since you are more likely to use Eclipse), download the JDK 5.0 Update 6 package. (You may also find it useful to download the J2SE 1.5.0 Documentation, as it will faster to access the documentation from your local machine than it is to access it over the web.)
Create an environment variable called JAVA_HOME that points to the directory in which you installed the SDK. To get javadoc to work correctly, you also need to add the bin directory of JAVA_HOME to your PATH environment variable.
To set environment variables on Windows, select System from Control Panel, go to the Advanced tab and hit the Environment Variables button. Add a new variable to the System variables called JAVA_HOME. Its value will be the location of the SDK (which is most likely c:\j2sdk1.5.0_01). Then append %JAVA_HOME%\bin to your PATH environment variable under System variables. This will put the executables associated with the SDK in your path. On Windows, PATH elements are separated by semicolons, so you may have to add a semicolon to the end of your PATH variable before appending %JAVA_HOME%\bin.
To set environment variables on tcsh (the default shell on Athena), add the following lines to your .cshrc (or .cshrc.mine) file:
setenv JAVA_HOME wherever you installed the sdk
setenv PATH ${PATH}:${JAVA_HOME}/bin
To set environment variables in bash (another type of Linix shell), add the following lines to your .bashrc file:
export JAVA_HOME wherever you installed the sdk export PATH=$PATH:$JAVA_HOME/bin
If you run Linux, you probably already have a copy of Emacs.
If you run Windows, see Item 2 of the Emacs FAQ for Windows.
In 6.170, we will use version 3.2.1 of Eclipse. If you use an earlier version, it may have poor support for generics and other Java 5 features, and you will not be able to use the Continuous Testing plug-in.
You should download Eclipse 3.2.1.
Eclipse does not come with an installer, so this confuses many people. Basically, you download it, unzip it into a directory, and then run the executable in that directory to start Eclipse. There are some small bugs in Ant within Eclipse that manifest themselves if it is installed in a directory with spaces in its name, so instead of installing it into a directory such as:
C:\Documents and Settings\Joe User\Desktop\eclipse
or
C:\Program Files\eclipse
use:
C:\eclipse
You should also install the Continuous Testing Eclipse plugin. This is already installed if you work on Athena.
You will have to make the following changes to your Team preferences in Eclipse 3.1M4:
If you have already run student-setup.pl on Athena, you are now ready to checkout the problem sets module psets.
Host: athena.dialup.mit.edu
Repository path: /mit/<your username>/6.170/cvsroot
User: <your username>
Password: <your password>
Connection type: extssh
The command line and emacs should function the same as on Athena, with the exception that when you checkout, you must specify the cvs root to be :ext:athena.dialup.mit.edu:/mit/YourUserName/6.170/cvsroot. For example, to checkout the psets module you should run:
cvs -d :ext:athena.dialup.mit.edu:/mit/YourUserName/6.170/cvsroot checkout psets
When you execute other commands on the command line or in Emacs, you will be asked to supply your athena password.
Once you are done with a problem set, you must commit it to CVS, because we collect the problem set by retrieving whatever is in your CVS repository at the deadline. (However, it is recommended to commit frequently, not just when you have completed the problem set.) Also, it is highly recommended to validate the problem set on Athena.
cd ~/6.170/psets/psN/ ant validatewhere N is the problem set number.
All code that you turn in must run on Athena using the staff-supported version of Java. You are permitted to use any version of Java to develop your code (generally speaking, any version of Java 5 or Java 6 will work well), but the 6.170 staff provides technical support only for the staff-suppported version, and resolving any discrepancies between Java versions is your own responsibility.
You may use whatever tools you like to develop your code. The 6.170 staff provides technical support only for using Eclipse and Emacs on Athena. This is not because we think that this setup is the only way (or even the best way) to develop Java code, but because we cannot be expected to be familiar with every operating system or text editor that you might choose to use.
If you choose to use Eclipse on your own machine instead of on an Athena workstation, and you have problems, then you are generally on your own. (The 6.170 staff will try to help you, but only if you are running either Linux or Windows XP, and we make no guarantees.) That being said, it is generally safe to expect Eclipse to behave the same way on all operating systems on which it is supported (which currently includes: Windows 98 and later, Mac OSX, Linux, Solaris 8, AIX, and HP-UX). We know that the Athena workstations are not the most powerful machines in existence, so you may find that Eclipse works much better when you run it from your own computer.