On 10.05.2003 16:49:12 Robert P. J. Day wrote:
> 
>   not being even vaguely concerned about embarrassing myself, several
> questions about JAI/JIMI usage with FOP.
> 
> 1) from what i read, both JIMI and JAI are graphics libraries, so only
>    one is necessary.  in addition, it *appears* that JAI is the newer
>    technology and, if it's feasible, it's the preferred package.
>    (that is, JAI will eevntually obsolete JIMI, or am i reading that
>    incorrectly?)

I think you are correct.

> 2) i downloaded the latest JAI tarball from sun, and all it contains
>    is three .jar files, and a shared library.  following my standard
>    practice, i copied those jar files to a standard jarfile directory
>    i maintain, and added all of them to my CLASSPATH.  (i realize that
>    the usage instructions suggest copying those files under fop/lib,
>    but it's not clear to me *why* that would make a difference, given
>    what i read in fop.sh)

The only files you need from JAI are:
- jai_core.jar
- jai_codec.jar

Copying them to fop/lib is important because you have to make sure FOP
is compiled using JAI support. If you compile FOP yourself (means: you
don't use the binary distribution) you have to put the two files above
in fop/lib so the Ant build process installs JAI support in the first
place. If you don't do that you get the error message in 4). The error
message is misleading, however. So I changed it in CVS. FOP 0.20.5 will
have a better error message.

A comment concerning the CLASSPATH environment variable: Due to bad
experiences in the past, many Java developers discourage the use of the
CLASSPATH variable. Always using -cp is much safer as soon as you have
more than one Java application on your workstation. On my machine, for
example, the CLASSPATH variable is non-existent.

> 3) regarding the shared lib, i copied it to the same location and
>    added that directory name to LD_LIBRARY_PATH.  (the JAI install
>    instructions are unspeakably badly written -- at one point, they
>    instruct the user to add the entire java CLASSPATH to the 
>    LD_LIBRARY_PATH, which doesn't seem at all necessary).
> 
>    at this point, based on what i've read, i would now be considered
>    to have installed JAI, no?  and in such a way that FOP would be
>    able to find it.

I didn't follow these instruction. Just use the -cp approach and include
the two jars above. Messing with CLASSPATH asks for trouble IMO.

> 4) when i try to transform my .fo to .pdf, eventually i get the
>    message:
> 
>    [INFO] Failed to load JAI, using Jimi instead
> 
>    what does this mean?  does it mean that FOP simply couldn't 
>    find the JAI jar files, or that it found them but, perhaps
>    because of a misconfiguration on my part, couldn't load the
>    appropriate classes?  it's pretty crucial to know which of
>    those errors is being identified here.

See above.

>   so ... what have i pooched completely here?  enquiring minds
> want to know.

I hope this helps.


Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to