JDK Install Instructions
In this section you will:
- Download and Install a Java 1.4 SDK
- Update your Environment Variables to point to the new Java installation.
Download
Download the appropriate JDK package for your platform from Sun's website.
|
It is possible to work with GeoServer using a non-Sun JDK. Feel free to do so at your own risk. If you run into problems using a non-Sun JDK, support from the GeoServer community will be limited. |
Windows
Choose the Windows Offline Installation option.
Linux
Choose the self-extracting file option. Or if your distribution supports RPM's, select the RPM in self-extracting file option.
Install
Windows Installer
- Run the Windows Installer downloaded in the previous section.
- Navigate through the installer. The rest of this section assumes all defaults have been accepted.
- Optional: On the Custom Setup screen, disable the Public Java Runtime Environment option.
- Congratulations, you now have a JDK on your system!
Linux (Binary)
Depending on your choice of installation location, you may require root access perform the installation.
- Change directory to the location in which you want the JDK installed. Example: /opt/java.
- Execute the command (substituting the proper version number for the JDK you downloaded):
[/usr/java]% sh j2sdk-VERSION-linux-i586.bin
- Using the Space Bar, navigate to the end of the License Agreement, and accept by typing 'yes'.
For inquiries please contact: Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, California 95054, U.S.A. (LFI#129530/Form ID#011801) Do you agree to the above license terms? [yes or no] yes
Linux (RPM)
Installation must be performed by a user who has the appropriate permissions to install RPM's.
- Execute the command (substituting the proper version number):
[/home/user]% sh j2sdk-VERSION-linux-i586.rpm.bin
- Using the Space Bar, navigate to the end of the License Agreement, and accept by typing 'yes'.
- Execute the command (again, using the proper version number for your download):
[/home/user]% rpm -ivh j2sdk-VERSION-linux-i586.rpm
Environment
It is important to add the JAVA_HOME properly in order for maven (our build system) to function correctly.
Windows
(some of this may be done automatically)
- Right-click the My Computer icon located on your Desktop or Start Menu, and select Properties.
- On the Properties Dialog, select the Advanced tab, and click the Environment Variables... button.
- Set the JAVA_HOME variable to point to your JDK installation.
- Update the PATH variable to include %JAVA_HOME%/bin.
Linux
Execute the following commands to update your environment (assuming you are using a bash shell). You will once again need to substitute the proper version number for this to work.
export JAVA_HOME=/opt/java/jdk-VERSION/ export PATH=$PATH:$JAVA_HOME/bin
The above commands should be added to your profile (as in your .bashrc) in order to persist.