At 04:48 PM 3/21/2007, Adrian Custer wrote:
>Hello,
>
>You should have JAI in your runtime or build geotools trunk with the
>brand new flag -Pnojai which will grab the non-native (slower) JAI files
>as jars and do all the magic to make things work.
>
>--adrian


Adrian,

Thanks for the help. Although I kvetch a bit about the roadblocks I 
have encountered in trying to get GeoTools working, I really do 
appreciate the work the community is putting into the project and the 
support that is being provided. Anyway, I've spent an hour or so 
trying to figure out what you were talking about in your reply and 
have come up with a procedure that worked for me.

Since I think this something that other developers will encounter 
(especially those who, like me, have limited experience with Java and 
are new to Eclipse) I am providing it below. Since I am a relative 
novice here, there is a fair chance that I got something wrong. Since 
I do not want to propagate misleading information to the community, I 
ask that others on the mailing list check it out and post corrections 
as necessary.  I would not presume to add my notes to the GeoTools 
wiki, but will have no problem at all if someone wants to refine them 
a bit and include them in the GeoTools documentation.

So here's the text:

Issues Related to the JAI in Configuring a GeoTools plug-in in the 
Eclipse Environment

Although the JAI classes make a valuable contribution to GeoTools in 
terms of software performance, they are a chronic source of confusion 
for new developers. When configuring a GeoTools plug in, these 
classes will not be added to the plug-in automatically, but require 
specific steps.

1.  Locate the JAI-related .jar files that were add to your 
computer's file system when you installed the JAI extensions. For 
example, if you installed your Java Runtime Enviroment (JRE) in a 
folder called "c:\Program Files\Java\jre1.5.0", you should be able to 
find the JAI jar files in the sub folder "lib\ext". As of this 
writing, the JAI classes are stored in jar files named 
"jai_codec.jar", "jai_core.jar", and "jai_imageio.jar".  Naturally, 
this particular choice of names is subject to change in future 
releases of Java.

2. In the Package Explorer view in Eclipse, open up the plug-in 
project that includes the GeoTools jar files and other resources.

3. Right click on the package name to bring up the actions menu and 
select "Import". In the import dialog, select "File System".  In the 
File System dialog, browse over to the folder identified in Step 
1.  Add the JAI jar files.

4. Returning your attention to the plug-in project opened in step 2, 
open the META-INF folder to reveal the MANIFEST.MF file. Click on the 
MANIFEST.MF file to bring up the Eclipse "Runtime" editor.  At the 
bottom of the Runtime editor, there are several tabs including 
"Overview", "Dependencies", "Runtime", etc.  Click on the Runtime 
tab.  One section of the tab is used to specify "Classpath".  Add the 
JAI files to your plug-in's classpath by clicking the add button and 
making the proper selections.


That's it. Hope it helps.

Gary










Gary W. Lucas
Sonalysts, Inc.
215 Parkway North
Waterford CT 06320, USA
(860) 326-3682 




-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to