OpenGeo

OpenGeo Stack Workshop

Table Of Contents

Previous topic

Installing GeoServer

Next topic

Installing GeoServer

Installing Java

GeoServer runs on the Java geoserver platform. This section covers the installation of the Java Development Kit (JDK) that is necessary to run GeoServer.

  1. Navigate to the workshop software directory.

  2. Run the Java Development Kit installer by double-clicking on the file named jdk-1_5_0_14-windows-i586-p.exe, or alternatively by right-clicking on the file and selecting Open.

    Note

    Running GeoServer requires a Java Development Kit (JDK), not just a Java Runtime Environment (JRE).

    ../_images/java_install1.jpg

    Running the Java installer

  3. Accept the License Agreement and click Next.

    ../_images/java_install2.jpg

    Reviewing the Java license agreement

  4. On the Custom Setup screen, disable the Public JRE feature and click Next.

    Note

    A JRE is often installed by other applications on the system. To prevent a conflict the Public JRE option should be disabled.

    ../_images/java_install3.jpg

    Disabling the public Java Runtime Environment

  5. Exit the installer by clicking Finish.

Setting the JAVA_HOME Environment Variable

Certain applications such as GeoServer rely on the existence of an environment variable named JAVA_HOME in order to run. This environment variable points to the Java installation on the system. This section covers the task of defining the JAVA_HOME environment variable.

  1. On the desktop right-click the My Computer:guilabel: icon.

    ../_images/java_install4.jpg

    Opening My Computer properties from the desktop

    Note

    Depending on the Windows configuration the My Computer icon may only exist in the Start Menu.

    ../_images/java_install5.jpg

    Opening My Computer properties from the start menu

  2. Open the Advanced:guilabel: tab and click the Environment Variables button.

    ../_images/java_install6.jpg

    Adding an environment variable

  3. In the Environment Variables:guilabel: dialog click the New button and define a new variable called “JAVA_HOME” that points to the JDK installed in the previous section.

    ../_images/java_install7.jpg

    Defining the JAVA_HOME environment variable

  4. Click OK to add the JAVA_HOME variable, and then OK to close the Environment Variables dialog.

At this point Java is installed on the system. To verify the installation and configuration of the JAVA_HOME variable start a windows command line and execute the following command:

%JAVA_HOME%\bin\java -version

The command should return output similar to the following:

java version "1.5.0_21"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_21-b01)
Java HotSpot(TM) Client VM (build 1.5.0_21-b01, mixed mode, sharing)

If it does not Java is not installed correctly on the system.