Java Installation

For the Ponder2 tutorial examples described here, you must have Java 1.5 or later installed on your computer.  You will need at least the Java Runtime Environment to run everything (examples and exercise 1) but you must have the Software Development Kit with the Java compiler to do exercise 2 and/or create your own managed objects since you have to write and compile Java code.

You can verify your installation by using the following commands:

Windows

Start a command window (Start button, Run..., cmd) then at the prompt:

C:\Documents and Settings\user>java -version
java version "1.6.0-beta"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.6.0-beta-b59g)
Java HotSpot(TM) Client VM (build 1.6.0-beta-b59g, mixed mode, sharing)
C:\Documents and Settings\user>

This shows that you have at least the Java Runtime Environment (JRE). To check that you have the Java Development Kit installed you have to find the correct directory.

The Java installation is generally in c:\Program Files\Java.  There should be two directories in there, one starting with jdk and one with jre. If you only have one directory starting with jre then you need to follow the installation instructions below.

Unix (Mac OS X, Linux, BSD etc.)

Start a terminal window and at the prompt:

$ java -version
java version "1.5.0_07"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_07-164)
Java HotSpot(TM) Client VM (build 1.5.0_07-87, mixed mode, sharing)
$

This shows that you have the Java Runtime Environment (JRE) installed. You should also verify whether you have the Java Development Kit installed.  To do this, you can simply check to see if the Java compiler exists. The following command will suffice:

$ which javac
/usr/bin/javac
$

If you get an error message then you need to follow the installation instructions below.

Installation

It does not matter which version of Java you have as long at is it is 1.5 or later.  The examples above show 1.6 on my Windows computer and 1.5 on my Mac.

If you have an earlier version or Java can't be found then you must install a compatible version before trying to run these examples.  The relevant Java SE Development Kit (JDK) can be obtained from Sun's website.  Download the software (at the time of writing the first one on the page is the correct one) and follow the instructions.  After installing Java, try the above test again, you may have to restart your terminal, logout or even reboot for the new version to appear.