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:
- Download the latest pre configured JRE from this page:
http://udig.refractions.net/downloads/jre - Unzip this JRE into your eclipse directory
- 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
- 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) - Execute the installer
Example: jre-6u3-windows-i586-p.exe - Accept to the software license agreement
( You could check "Show advanced options panel" if you want to include additional language or color-management profiles)
- 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:
- Download the Installer from java.net:
- 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) - Execute the installer, agree to the software license agreement
- 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:
- Download the Installer from java.net:
- 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) - Execute the installer, agree to the software license agreement
- Choose the Destination Folder, this should be the location of your JRE
- Make sure to change your Setup Type to Complete
- 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:
- Download "windows-gdal-mrsid.zip" from this page: http://www.geo-solutions.it/libraries/
- Unzip the "windows-gdal-mrsid.zip" file into your JRE
- 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
- Open up the Control Panel
- Select Add or Remove Programs
- 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.
- 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. - 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.
- 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
- extract the archive with the command:
Linux JAI Install
To setup your JRE to support Java Advanced Imaging:
- Download the Installer from sun:
- Download Java Advanced Imaging Image I/O Tools 1.2_01
(Be sure to choose the to choose the Linux JRE Install)
- Download Java Advanced Imaging Image I/O Tools 1.2_01
- Move to the root directory of your JRE installation.
- Unpack the JAI archvie file with the command:
sh <archive-file> - 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:
- Download the Installer from sun:
- Download Java Advanced Imaging Image I/O Tools 1.0_01
(Be sure to choose the to choose the *Linux JRE Install*http://udig.refractions.net/confluence/pages/editpage.action?pageId=238)
- Download Java Advanced Imaging Image I/O Tools 1.0_01
- Move to the root directory of your JRE installation.
- Unpack the JAI archvie file with the command:
*sh <archive-file> - 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:
- Download "linux-gdal-mrsid.zip" from this page: http://www.geo-solutions.it/libraries/
- 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
- Check that Java is installed:
> which java /usr/java/jdk1.5.0/bin/java
- 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)
- Check that JAVA_HOME is set up correctly:
>echo $JAVA_HOME /usr/java/jdk1.5.0
- If your result is empty then you should set a JAVA_HOME variable.
- Check that your CLASSPATH is set up correctly:
> echo $CLASSPATH
- Please ensure the following jar files are included in your CLASSPATH declaration:
- mlibwrapper_jai.jar (JAI)
- libwrapper_jiio.jar (JAI)
- jai_imageio.jar (ImageIO)
- 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.
- 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) - 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.
- You can workaround this problem using regedit.exe
- 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.
- HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment =
- 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?