Installing the Tools You Need (Windows)
NOTE: Even if you have already download "Java" for use by your web browser or other applications, this is most likely not enough. Most applications only require the Java Runtime Environment (JRE), which is what lets you run applications. But for this course you will need the Java Software Development Kit ("Java SDK", or sometimes just "JDK"), so that you can make your own Java applications.
IF YOU HAVE A 64-BIT MACHINE: Several of these instructions change slightly if you have a 64-bit machine instead of the usual, soon-to-be-outdated 32 bits. When this is the case, the instructions for the 64-bit machine will be in square braces and marked, like this:
People with old computers do FOO [64-bit Do BAR instead].
Table of Contents:
Java
PREREQ: NONE
Download
- Go here.
- Scroll down to "JDK 5.0 Update 16" and click on "Download."
- For "Platform", select "Windows" [64-bit: "Windows x64"]. Check the box saying you agree to the license agreement, and click "Continue."
- Click on "jdk-1_5_0_16-windows-i586-p.exe" [64-bit: "jdk-1_5_0_16-windows-x64.exe"] and click "Save File" when asked.
If you only have intermittent internet connectivity, e.g. a bad wireless connection, you might want to use the Sun Download Manager, which will pause the download and let you restart it if you lose your connection. To do this, you'll need to have the JRE installed, which you can get from www.java.com. Follow these instructions instead of the last step above:
- Check the box next to "Windows Offline Installation" and then click on "Download Selected with Sun Download Manager".
- When it asks if you want to open or save a JNLP file, click "Open."
- When it asks if you want to run the application, click "Run."
- Accept the license agreement
- Click "Browse" and pick a directory you'd like to download the install files to.
- Click "OK"
- Select the file name, and then click "Start."
- Once the file has finished downloading, you can close the Sun Download Manager.
Install
Find and double-click on the .exe file you downloaded. Do the
standard
click-Next-a-lot-accept-the-license-agreement-and-click-Next-some-more.
If you already have a JRE installed, it may say "There is already a
Public JRE installed. Would you like to reinstall it?" Either way is
fine.
Test
- Open up a command prompt (go to the Start Menu, click on "Run..", type "cmd" and click "OK").
- Type
cd "C:\Program Files\Java\jdk1.5.0_16\bin"
and hit "Enter".
- Type "java.exe -version" and hit "Enter". You should see
java version "1.5.0_16"
Java(TM) SE Runtime Environment (build 1.5.0_16-b02)
Java HotSpot(TM) Client VM (build 1.5.0_16-b02, mixed mode, sharing)
If yours doesn't look exactly like this, that's okay, as long as it says "java version 1.5.x"
- Type "javac.exe -version" and hit "Enter". It should say "javac 1.5.0_16" (again, as long as it's at least version 1.5, you're fine).
Back to Table of Contents
Cygwin + Subversion (recommended)
Download
Download setup.exe.
Install
- Run setup.exe
- Click "Next", select "Install from Internet" and click "Next."
- It is recommended that you do not change the root directory (where it will be installed). You can change it if you wish, but the root directory must not contain spaces anywhere in it. In particular, do not make your Cygwin root directory a subdirectory of "Program Files" or "My Documents."
- Leave the other settings as they are, and click "Next."
- It will ask you for the local package directory. This can be deleted once you are done installing, but if you want to update Cygwin it's convenient to have it around.
- Click next a few times, and then you should see a list of "Available Download Sites." Any one of them is fine, but if you find your downloads being slow, you may want to come back to this step and try another.
- It should download setup.bz2 and a couple other files, and then show you a list of packages to install:
- Expand the "+" next to "Devel":
then scroll down and click the "Skip" next to "subversion" once (it should now say "1.4.6-3" instead of "skip").
Collapse Devel.
- UPDATE 10/5, 3:50pm: Expand "Archive", then select "zip" and "unzip" in the same way you selected subversion above.
- Select Next, and finish up the installation.
- UPDATE 10/4, 2:30pm: In order to be able to type java and javac in Cygwin as expected, you'll have to add Java to your PATH environment variable. Add "C:\Program Files\Java\jdk1.5.0_16\bin" to your PATH environment variable (if you installed Java somewhere else use that directory instead, but it's important to have the "\bin" at the end).
How do I set my PATH variable?
Select Start -> Control Panel -> System -> Advanced -> Environment Variables -> System Variables -> PATH. If the PATH variable exists, select it and click Edit, then add ";C:\Program Files\Java\jdk1.5.0_16\bin;" to the end of its value (if the current value of PATH ends with a semicolon, you can omit the first semicolon in the previous string). If the PATH variable does not exist, select New. Type PATH for the variable name and put C:\Program Files\Java\jdk1.5.0_16\bin; for the variable value.
- UPDATE 10/4 3:15pm: By default, Cygwin starts in C:/ (which Cygwin calls /cygdrive/c/). To change this, you need to set your HOME environment variable to the directory you want Cygwin to start in. This is essentially the same as setting your PATH environment variable, as above.
Test
- Run Cygwin (from the Start Menu or Desktop). If you did not install icons in either place, you can select "Run..." from the Start Menu and run C:/cygwin/cygwin.bat. (If you changed your Cygwin root directory, then replace "C:/cygwin" with the root directory you specified.) You should see something like:
- In the Cygwin terminal, type "svn" and hit Enter. You should see:
Type 'svn help' for usage.
Back to Table of Contents
Emacs (recommended)
Download
Download emacs-22.3-bin-i386.zip.
Install
- Unzip the file you downloaded wherever you like (C:/Program Files/ is a standard choice).
- Add emacs to your PATH variable.
How do I set my PATH variable?
Select Start -> Control Panel -> System -> Advanced -> Environment Variables -> System Variables -> PATH. If the PATH variable exists, select it and click Edit, then add ";C:\Program Files\emacs-22.3\bin;" to the end of its value (if the current value of PATH ends with a semicolon, you can omit the first semicolon in the previous string). If the PATH variable does not exist, select New. Type PATH for the variable name and put C:\Program Files\emacs-22.3\bin; for the variable value.
- Setup your Emacs init file.
Test
- Start Menu -> Run... and enter "C:/Program Files/emacs-22.3/bin/emacs.exe". You should see emacs come up, like this:
- If you installed Cygwin, open up Cygwin. Type "emacs" at the Cygwin prompt at hit Enter. You should see emacs come up as before.
Back to Table of Contents