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.
You need a Java virtual machine You will need the Java software development kit (JDK) from the Sun website. If you have a Macintosh with Mac OS X, you almost certainly have the JDK installed already, so you don't have to download the JDK. If you are using a PC running a version of Windows, chances are that you don't have the JDK yet, and you can download it here. Several download options will be offered. Choose JDK 5.0, the J2SE Development Kit (JDK). Be sure you're getting the JDK and not just the JRE. Do not get the "bundles" that include other programming environments, such as netBeans). Once you start the download process, you will need to accept license agreements. When prompted for installation options, accept the default options, and run the .exe file. (Only customize the installation if you know your hardware well.) If you cannot double-click on a jar file to start it running, or if
you cannot execute any of the commands java, javac, javadoc, or jar, you
probably have not set your path correctly. We explain this for Windows
2000; older windows systems are similar.
There should be a path that looks like this: C:\j2sdk1.4.1_02\bin. This
is a directory called bin inside the directory where you installed the
sdk. It may be different on your computer. If such a path is not there,
you have to add it. Bring up the help in your Windows system, open the
index, and look for "path". There, you will find instructions
on appending another directory to variable path. It may be something like
this (but read the instructions): The easiest thing for you to do is to download this zipped version of DrJava and unzip it: 2005aug14drjava.zip. Or, here is an unzipped version. This version is supposed to work whether you have Java 1.4.2 or Java 1.5, and we advise using it. Alternatively, download the latest version of DrJava from this web page
(by clicking the link). Choose a version of DrJava to download.
The page will show you several versions
of DrJava. Use the Current Stable Release (runs with JDK1.5.0, see above). On a
Windows PC, click on Stable Windows App. You'll be sent to select a location
(mirror) from which to download DrJava. You may choose any of the mirrors. Warning: you may get a dialog saying something about a "JAR archive security check". If you do, just right-click on the DrJava download link and select "Save Link As" (or the equivalent in your browser). A common DrJava problem: finding tools.jar If the system tells you that it cannot find a file called tools.jar, you need to select the correct location of that file. On a PC, it is in some place like
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. There are several ways to run DrJava:
Documentation --how to use DrJava The demos given in class and in the demo sessions should help, if you take notes. Second, information on using DrJava is in Appendix I of the course text and in Chapter 19 Chapter 19 of the accompanying CD ProgramLive. Watch the ProgramLive lectures! They are short and informative. Third, here is documention on using DrJava on the web. Do you get a message that looks like this?
It may mean that your computer has two different systems on it and is an inconsistent state. If your computer has jre5.0, then it cannot use SDK 4.7. Uninstall SDK4.7 and download JDK 5.0 and use its tools.jar. |
|||||||||||||