Dashboard > Admin > Home > 02 Development Environment > 04 Java Runtime Environment
Admin
04 Java Runtime Environment
Added by jive , last edited by Jody Garnett on Aug 11, 2008  (view change)
Labels: 
(None)

Eclipse provides its own compiler; so we can develop uDig using just a Java Runtime Environment. As an graphics application we make use of the following JRE extentions: Java Advanced Imaging and Java Image IO/

Quickstart

If you would like to skip the rest of this page:

  1. Download the latest pre configured JRE from this page:
    http://udig.refractions.net/downloads/jre
  2. Unzip this JRE into your eclipse directory
  3. And rename the folder to be jre so eclipse.exe will pick it up

The jre downloads on the above page include JAI and ImageIO.

Manual Install

This section covers the manual install of a JRE directly from Sun, you can use these instructions to assemble your own JRE (if you are interested in using a version other than one of those already prepared above).

Windows Manual Install

Install Java Runtime Environment

  1. Download the latest JRE from sun: http://java.sun.com/javase/downloads/index.jsp
    (Be sure to choose the to choose the Windows Offline Installation)
  2. Execute the installer
    Example: jre-6u3-windows-i586-p.exe
  3. Accept to the software license agreement
    ( You could check "Show advanced options panel" if you want to include additional language or color-management profiles)
  4. Press Finish

Reminder: Eclipse provides a Java compiler, so all we need is a JRE.

Install Java Advanced Imaging

A one-click installer for Java Advanced Imaging 1.1.3 For JRE is available:

  1. Download the Installer from java.net:
  2. Download the latest stable release for JRE:
    jai-1_1_3-lib-windows-i586-jre.exe
    (Be sure to choose the to choose the Windows JRE Install)
  3. Execute the installer, agree to the software license agreement
  4. Choose the Destination Folder, this should be the location of your JRE

Install Java Image IO

A one-click installer for JAI Image I/O Tools 1.1 for JRE, here is how to proceeed:

  1. Download the Installer from java.net:
  2. Download the latest stable release for JRE:
    jai_imageio-1_1-lib-windows-i586-jre.exe
    (Be sure to choose the to choose the Windows JRE Install)
  3. Execute the installer, agree to the software license agreement
  4. Choose the Destination Folder, this should be the location of your JRE
  5. Make sure to change your Setup Type to Complete
  6. Click next to "Complete" the installation

ImageIO-Ext

The net.refractions.udig.libs refresh.xml script will download ImageIO plug-ins that make use of GDAL to support several formats normally outside of the reach of Java developers.

For these plug-ins to work we need to have installed some gdal DLLs into our JRE/bin directory. For more information please visit the ImageIO-ext project.

Here was the instructions last time I checked:

  1. Download "windows-gdal-mrsid.zip" from this page: http://www.geo-solutions.it/libraries/
  2. Unzip the "windows-gdal-mrsid.zip" file into your JRE
  3. Confirm that gdal DLLs have been add to your bin directory.

You should then be ready to go; if you have a license for ECW support you can follow the directions on the ImageIO-ext project to build a JRE with additional functionality beyond what we can distribute to the public.

Windows Install Check

How to check your System

  1. Open up the Control Panel
  2. Select Add or Remove Programs
  3. Confirm that the following programs are listed:
    • Java (TM) 6 Update 3 (or whatever it is you installed)
    • Java Advanced Imaging 1.1.3 for JRE
    • Java Advanced Imaging Image I/O Tools 1.1 for JRE

Linux JRE Manual Install

Here is how to set up a Java Runtime environment.

  1. Download the Installer from sun:
    http://java.sun.com/javase/downloads/index.jsp
    (Be sure to choose the to choose the Linux JRE Install)
    If your system supports RPM based packaging, you may with to choose the RPM self-extracting file. If this not the case or you do not wish to install via RPM you can choose the non-RPM self-extracting file.
  2. Installing with the RPM:
    • switch to root or some other superuser which has write access to the RPM database.
    • extract the RPM file from the archive with the command:
      sh <arvhive-file>
    • read the JRE licence aggreeent, scroll to the end and type 'yes' to accept. The .rpm file should then be extracted from the archive.
    • Install the JRE rpm with the command:
      rpm -ivh <rpm-file>
      This will install the jre in a standard location on your system. This is /usr/java on modern systems.
  3. Installing with the regular archive:
    • extract the archive with the command:
      sh <archive-file>
    • read the JRE licence agreement, scroll to the end and type 'yes' to accept. The JRE tree should then be extracted from the archive.
    • move the extracted JRE directory to the desired installation directory

Linux JAI Install

To setup your JRE to support Java Advanced Imaging:

  1. Download the Installer from sun:
  2. Move to the root directory of your JRE installation.
  3. Unpack the JAI archvie file with the command:
    sh <archive-file>
  4. Read and accept the license agreement, this will extract the files from the archive.

Linux Image IO Install

To install JAI Image I/O Tools 1.0_01 for JRE:

  1. Download the Installer from sun:
  2. Move to the root directory of your JRE installation.
  3. Unpack the JAI archvie file with the command:
    *sh <archive-file>
  4. Read and accept the license agreement. This will extract the files from the archive.

Linux Image IO Ext Install

ImageIO-Ext

The net.refractions.udig.libs refresh.xml script will download ImageIO plug-ins that make use of GDAL to support several formats normally outside of the reach of Java developers.

For these plug-ins to work we need to have installed some gdal libraries into our JRE/bin directory. For more information please visit the ImageIO-ext project.

Here was the instructions last time I checked:

  1. Download "linux-gdal-mrsid.zip" from this page: http://www.geo-solutions.it/libraries/
  2. Unzip the "linux-gdal-mrsid.zip" file into your JRE

You should then be ready to go; if you have a license for ECW support you can follow the directions on the ImageIO-ext project to build a JRE with additional functionality beyond what we can distribute to the public.

Linux Install Check

  1. Check that Java is installed:
    > which java
    /usr/java/jdk1.5.0/bin/java
    
  2. If Java is not installed you will see something like this:
    > which java
    /usr/bin/which: no java in (/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/home/X/bin:/home/jive/eclipse)
    
  3. Check that JAVA_HOME is set up correctly:
    >echo $JAVA_HOME
    /usr/java/jdk1.5.0
    
  4. If your result is empty then you should set a JAVA_HOME variable.
  5. Check that your CLASSPATH is set up correctly:
    > echo $CLASSPATH
    
  6. Please ensure the following jar files are included in your CLASSPATH declaration:
    • mlibwrapper_jai.jar (JAI)
    • libwrapper_jiio.jar (JAI)
    • jai_imageio.jar (ImageIO)
  7. If your result is empty then you should set a CLASSPATH variable (see the websites for JAI and ImageIO for the details).

Mac OS X

There are several happy Mac developers in the uDig community; so far they have not provided installation instructions. Please sign up to the developer list and ask questions.

  1. JAI is already installed on Tiger and Leopard
    (It is not quite the right version to make udig trunk happy but it will go a long ways)
  2. You can download a Java 6 implementation with an acd here: http://developer.apple.com/java/download/

Common Problems

Using More than one JRE

The JAI and ImageIO click installers are annoying in that it will not let you install in more then one JRE at a time.

  1. You can workaround this problem using regedit.exe
  2. Modify the following key:
    • HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment =
      1.5 to attach to the latest 1.5 install or 1.4 to attach to the latest 1.4 install.
  3. Run the one click installer

What a pain - the alternative is a manual install where you place the parts into your JRE by hand.


Previous: 03 Eclipse for RCP Developers Next: 05 Eclipse Workspace Location

For the macosx java 6 I see on adc:

Java for Mac OS X 10.5, Update 1 adds Java SE 6 version 1.6.0_05 to 64-bit Intel Macs.

 That is not for macbooks, right?

Powered by a free Atlassian Confluence Open Source Project License granted to uDig. Evaluate Confluence today.
Powered by Atlassian Confluence 2.7.1, the Enterprise Wiki. Bug/feature request - Atlassian news - Contact administrators
User-friendly Desktop Internet GIS