Mac OS X users
You need DrJava. Download the Mac OS X App.
Windows users
You need two things: a Java compiler such as J2SE v 1.4.2_05, and DrJava.
-
Sun's SDK 1.4.2. On that page, select "DOWNLOAD" from the right-hand column in the "Download J2SE v 1.4.2_05" section. You don't need to download NetBeans. Get the SDK, not the JRE. Warning: this is a big download!
If you are having trouble, you should try the "Windows Offline Installation".
-
DrJava. Download the Windows App.
Other operating systems
You need two things: a Java compiler such as J2SE v 1.4.2_05, and DrJava.
-
Sun's SDK 1.4.2. On that page, select "DOWNLOAD" from the right-hand column in the "Download J2SE v 1.4.2_05" section. You don't need to download NetBeans. Get the SDK, not the JRE.
-
Get DrJava. Download the Jar File.
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:
Compiler not found. The file you chose did not appear to contain the compiler. Would you like to pick again? The compiler is generally located in 'tools.jar', in 'lib' subdirectory under your JDK installation director. (If you say 'No', DrJava will be unable to compile programs.).
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".
Java
Here are some general Java resources, including documentation.
-
Here are some articles about unit testing that you might find interesting:
-
The JUnit website.
-
Creating JUnit test cases: the first 6 paragraphs (to the end of the "Creating test cases" section) are pretty easy reading and introduce the philosophy of JUnit fairly well.
-
JUnit Cookbook: the first two sections might be quite helpful.
-
-
A very nice Java glossary. (Very useful!)
-
Documentation for the Java API (Very useful!)
-
Online Java language tutorial.
-
How to use javadoc to document your Java programs.
-
Code Conventions for Java, a comprehensive set of guidelines on programming style. The 108 style guide is based on this, and is what you should pay attention to. We provide the link mostly to show you that style is considered Really Important in the real world.
Java Software (some of it free)
-
Here is a page for Linux Java tools.
-
Here is a page for general (Windows and Mac) Java tools.
-
Here is a rather overwhelming list of Java resources, both free and commercial.
-
Here is a page of reviews of Java-related products by the online magazine JavaWorld.