apache > db

- Home
- Apache Derby

Font size:

# Install Java Development Kit (JDK)

- Install JDK 1.3 or higher
- Set PATH
- Set JAVA_HOME
- Test the 'java' command

## Install JDK 1.3 or higher

Derby requires JDK version 1.3 or higher. That much said, the Fortune Server was developed using JDK 1.4. So, if you haven't already installed the JDK, you might as well install Version 1.4.

No specific vendor implementation is required. Java's reference implementation is at http://java.sun.com/j2se/.

## Set PATH

Set your PATH environment variable to include the JDK bin directory. Your operating system uses the PATH variable to find the java interpreter and the javac compiler.

Windows: Set PATH to include JDK

    C:\> set PATH=%PATH%;C:\jdk1.4\bin

UNIX Korn Shell: Set PATH to include JDK

    $ PATH=/opt/sun-jdk-1.4.2.04/bin/bin:$PATH
    $ export PATH

## Set JAVA_HOME

Set your JAVA_HOME environment variable to include the root JDK directory. Some applications, such as Tomcat, use JAVA_HOME.

Windows: Set JAVA_HOME

    C:\> set JAVA_HOME=C:\jdk1.4

UNIX Korn Shell: Set JAVA_HOME

    $ JAVA_HOME=/opt/sun-jdk-1.4.2.04
    $ export JAVA_HOME

## Test the 'java' command

Verify that your PATH variable includes the java binary with the command shown below:

    java -version
    java version "1.4.2_04"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_04-b05)
    Java HotSpot(TM) Client VM (build 1.4.2_04-b05, mixed mode)

Depending on the version you installed, the output you get from this command may be different from what is shown above.

If you don't see valid version information output when you type "java -version", then STOP! And don't proceed until you resolve that problem.