principles that are derived from a mathematical notion of program correctness. In addition, related ideas in "algorithmic problem solving" are explored. |
||||||||||||||||
|
We will not run many programs on the computer. Our goal is to learn to develop programs using a methodology that convincingly leads to a program that we know is correct, so why should we have to run it? Ha! Nevertheless, it may be useful for you to translate your resulting program into Java and run it, just to see how the program works. For this purpose, we suggest using DrJava, a free "Integrated Development Environment (IDE). DrJava may be used in class to demonstrate the development of programs in Java. You can download DrJava onto your computer and use it. It is free. DrJava was developed by Professor Corky Cartwright at Rice University. Both DrJava and Codewarrior are installed on CIT's computers.
You need a Java virtual machine DrJava requires a Java 2 v1.3 (or later) virtual machine and software development kit (SDK). If you are using a PC running a version of Windows, chances are that you don't have it yet (although a recent court ruling may change that in the future). If you have a Macintosh with Mac OS X, you almost certainly have the Java SDK installed already, and you don't have to download the SDK. One virtual machine/SDK is Sun's J2SE SDK --follow that link and select "DOWNLOAD" from the right-hand column that appears. Warning: this is a big download! If you want to download the Java API specifications, look at the very bottom of that page for "J2SE v 1.4.1 Documentation". Download DrJava (by clicking the link). The page will show you several versions of DrJava. Get the latest, which at the time of this writing is drjava-stable-20030822.jar. Note that DrJava won't run unless you have a Java 2 v1.3 (or later) virtual machine already installed. 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). We know that all this setup can be annoying, but you have to do it only once! A common DrJava problem: finding tools.jar Question: I downloaded Sun's J2SE SDK and DrJava. When it came to actually running DrJava, the following window kept popping up even though somehow DrJava still managed to run without me finding the file --what should I do?:
Answer: First, make sure you installed the Java SDK, not the JRE. (See above.) Now you need to find a file called "tools.jar". If you're using Windows, then when you installed the SDK, you probably put it in "Program Files". The name of the Java folder is probably something like "j2sdk1.4.0_01"; look inside that for a directory called "lib", and inside "lib" look for "tools.jar". There are several ways to run DrJava:
Documentation --how to use DrJava Here is documention on using DrJava on the web. We will demo it once in class.
|
|||||||||||||||