Skip to main content

more options

DrJava

The Java programming environment used in CS 1110 is DrJava, a free Integrated Development Environment (IDE). DrJava was developed by Professor Corky Cartwright at Rice University, who has developed a number of IDEs intended for beginning students. Dr Java is installed in the ACCEL lab and on most on computers in CIT labs, but you should have iit on your own computer as well.

If you have problems, and if you have a laptop, the best thing to do is to bring it in to someone to look at. Any of the course staff or consultants can help you with this. If you cannot bring in your computer, we have provided you with some instructions below. If you are having difficulty with these instructions, please email TA Eoin O'Mahony edo22@cornell.edu.

Installing DrJava (The Easy Way)

For most people, installing DrJava is a simple download. Perform the following steps:

  1. Go to drjava.org
  2. Find the section labeled Current Stable Release (not the beta release)
  3. Download the "native application" for your platform (Macintosh or Windows)
  4. Double-click on the file once it is downloaded

DrJava should be running on your machine. If you can launch DrJava with no error messages, congratulations.

On the other hand, if you get an error message, you will need to do more work. But before you try the steps below, the most important step is to first copy the text from the error message and keep it somewhere safe. We need that error message to help you out later, should you need it.

Installing DrJava (The Easy Way Did Not Work)

You are running a Macintosh

No up-to-date Macintosh should have any problem with DrJava. By up-to-date we mean running Snow Leopard or Lion and updated with the latest available software updates. If you are not up to date, update now.

If the problem still persists after the update, then you need to talk to someone to get it working. Please email TA Eoin O'Mahony edo22@cornell.edu.

You are running Windows

On Windows, the problem is generally one of two issues. Either you do not have Java or you have too many Java installations already. The latter might happen if you took this class previously and have an older version of Java installed.

Installing the JDK

DrJava is just an IDE (integrated development environment), and it does not automatically come with Java. If Java is missing from your version of windows, you will need to install the Java Development Kit (JDK). Install the JDK, not the JRE (Java Runtime Environment). The JRE is for running Java programs but not for making them.

Visit the Oracle download page for JDK 6 Update 30. Any relatively recent version of JDK 6 should be fine, but under no circumstances should you download JDK 7. JDK 7 is not supported by DrJava. The download should not to ask you to make an Oracle account. It if does, please let us know.

Once you have installed JDK, repeat the four steps from the easy way above. For most people in the class, this appears to solve the problem. If not, there is one more thing you can try.

Cleaning Out Old Java Versions

If you are still having problems, it is likely that some old version of Java on your system is causing problems. Perhaps you took this (or a similar class) previously. Or you downloaded a cool game that needed Java. Whatever the case, it is time to purge your system of those old Java versions.

Visit the Microsoft Install and Uninstall Support page. There is a big button saying Run now. Push that button.

You will get a list of programs when you do that. Look for everything that says Java or JDK. Uninstall those using this program. Uninstall all of them.

Once you have uninstalled Java, download and install JDK 6 Update 30 as described above (even if you already did this once before). Then repeat the four steps from the easy way above.

If this still does not work, get some help: Please email TA Eoin O'Mahony edo22@cornell.edu.

DrJava Documentation

DrJava is pretty easy to use. The demos given in class and in the demo sessions should help a lot, if you take notes.

More help is available in Appendix I of the course text and in Chapter 19 of the accompanying CD ProgramLive.

If all else fails, there is documention on using DrJava available on the web.

Can't use a JUnit tester.

One student reported not being able to create and use a JUnit tester; he got the error message: package junit.framework does not exist. To correct this, he did the following.

1. Downloaded file junit-4.1.jar (by clicking at the link).

2. Copied it into C:\Program Files\Java\jdk1.6.0_02\lib. (If you are using a different jdk, then store it in the appropriate place.)

3. Opened DrJava, and hit Edit > Preferences > Resource Locations. In the popup window, in the field Extra Classpath, hit Add then clicked on the junit-4.1.jar file in the lib folder. Then hit Apply > OK.

There may be slight differences depending on your operating system, but this is the general idea.