CS100M --> DrJava

The Java programming environment used in CS100 is DrJava, a free Integrated Development Environment (IDE). DrJava was developed by Professor Corky Cartwright at Rice University. Both DrJava and a professional IDE called Codewarrior are installed on computers in CIT labs in the Engineering Quad.

Two things that you'll need

You will need (1) the Java software development kit (JDK) from the Sun website and (2) the DrJava software from a separate website. If you have a Macintosh with Mac OS X, you almost certainly have the JDK installed already so you will download only DrJava. If you are using a PC running a version of Windows, likely you will need to download both the JDK and DrJava.

Installation

The Java software development kit

You can get the Java software development kit (JDK) from the CD in the back cover of the textbook "Getting Started with Java" by Gaddis or from the Sun website. It's easiest to use the CD from the book! If you go to the Sun website, several download options will be offered. Choose JDK 5.0 Update 11. Be sure that you're getting the JDK and not just the JRE. Do not get the "bundles" that include other programming environments, such as netBeans. Click here to start the download process. You will need to accept license agreements and select the download for your system (e.g., Windows platform). When prompted for installation options, accept the default options, and run the .exe file. (Only customize the installation if you know your system configuration well.)

DrJava

Download DrJava by clicking this link. The page will show you several versions of DrJava. Use the Current Stable Release. On a Windows PC, click on Download Windows App. (You may be sent to select a location (mirror) from which to download DrJava. You may choose any of the mirrors, but some are busier than others. I had good luck with the Phoenix, AZ mirror.)
Warning: your web browser may show a dialog saying something about a security check (Internet Explorer puts a tiny little bar near the top of the browser, so watch for it). As long as you have followed the links from the DrJava website, you can click on that bar to continue the download (or check the information given in the dialogs to make sure). Save and then run the .exe file.
If the system tells you that it cannot find a file called tools.jar, you need to select the correct location of that file. See the usual location below:

    C:\Program Files\Java\jdk1.5.0_04\lib\tools.jar 
You can also use a desktop tool to search for this file on your computer.

If you didn't set the correct path for the file tools.jar at installation time, set it after installation by going through DrJava's Preferences option. To do so, follow these menu items: Edit - Preferences - Resource Locations - Tools.jar Location. Then type or browse to the correct location.

Running DrJava

There are several ways to run DrJava:

  • On windows system, you can double-click on the .exe file to start DrJava.
  • From the command line, you can type java -jar drjava-stable-version.jar.
  • On many platforms, you can simply double-click the jar file to start DrJava.
  • On OS X, you can download drjava-stable-version-osx from the download page. You can then run DrJava as a normal application.

Here is documentation on using DrJava on the web. In addition, Appendix I of the text contains information on using DrJava.