On Sat, 2005-19-03 at 15:06 -0500, adam.battson@... wrote:
> New to Geotools, I'm experiencing difficulty installing/building the necessary
> libraries on Apple OS-X 10.3.8. Has anyone out there managed to install
> GeoTools 2 on a Mac? A straight-fwd procedure would be a big help.
I am one of the few geotools people with a mac, and have done some
geotools work on it (though I mostly use linux). I originally wrote the
information about geotools and mac last summer, so it is probably out of
date by now.
> For me, Maven fails to build, reporting it cannot find JAI. In more detail
> problems are as follows:
> 1. Geotools doco is incorrect at
> E.g. The code fragment given is not present in maven.xml file of Geotools 2.0.0
> src Stable Download.
The maven.xml file likely changed. My suggestion is to search the
maven.xml file for the error message you are getting and to comment it
out. I just looked at the 2.0 file and I would guess that the following
section needs to be commented out:
<available classname="javax.media.jai.JAI" property="jai.present"/>
<ant:available classname="javax.media.jai.JAI" property="jai.present"/>
<fail unless="jai.present" message="JAI extension not found. Please
download and install it from:
Once you comment this out (<!-- -->), you can build geotools with maven.
Some modules might fail without jai, but the majority should build fine.
> 2. Downloading necessary JAI files from
> gives dubious results: Clicking the ‘Custom’ install option reveals that JAI
> will not be installed (and ofcourse JAI-ImageIO-Tools for OS-X are not supplied
> by Apple or Sun). Only Java3d is installed.
I used the packages downloaded from the following link. They worked fine
for me last summer and appear to still be available:
With this installed, more of the geotools library can build.
> Even if JAI was installed, it
> appears the files would be placed in /System/Library/Java/Extensions/... , not
> where Geotools/maven.xml apparently expects to find them, in
This does not matter: as long as the jars in Java/Extensions/... are on
the classpath they will be found (javax.media.jai is a package name, not
a file system hierarchy).
Also note that maven.xml might be searching for classes in the image_io
extensions, so it may still give an error message even if you have the
jai update installed from apple (I cannot remember).
> Has anyone managed to install JAI on their Apple with OS X
I did it successfully last summer on 10.3.4 (using the "Java 3D and Java
Advanced Imaging Update" from apple). I also manually installed the pure
java parts of the JAI image_io extensions (using the jar for linux). I
copied the image_io files
to /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext. But be careful. I remember that the way apple organized things was very confusing (they had lots of links to other directories). The location I used is similar to where extensions are installed on linux, but the /System/Library/Java/Extensions/ location might work also.
> Can maven.xml be edited to the location where Apple puts the JAI files?
Should not be needed (comment out the check for jai).
> 3. It appears Apple will only supply .jnilib files, not .jar as I'd expect. If I
> can install JAI and have Maven see it, will these work okay with the build?
I have no idea.
> All this is killing me... Any advice much appreciated!
It is possible to get most of geotools running on mac, so keep trying.
If you get stuff to work, please update the wiki (or leave a comment) so
that future mac people will have less trouble.
With JAI (from apple) and image_io (installed jar by hand) I was able to
compile the 2.0 release without any modifications.