1

I'm currently setting up two GeoServers running on two separate Linux machines. One of the GeoServers is running version 2.20.2. and the other one is version 2.19.5.

I'm trying to install Native Jai and Native JAI ImageIO in order to increase the image handling performance.

Both machines are running Ubuntu 20.04.4 LTS.

java -version
openjdk version "11.0.14" 2022-01-18
OpenJDK Runtime Environment (build 11.0.14+9-Ubuntu-0ubuntu2.20.04)
OpenJDK 64-Bit Server VM (build 11.0.14+9-Ubuntu-0ubuntu2.20.04, mixed mode, sharing)

So far I've followed these instructions: https://download.java.net/media/jai/builds/release/1_1_3/INSTALL.html

Specifically this part:

CLASSPATH Installation Instructions for Solaris/Linux Platforms

The tar.gz downloads are installations which do not check for the JDK or the JRE and install into a directory called jai-1_1_3 by default. CLASSPATH needs to be set to point to the jar files in this directory.

Assuming:

$PLATFORM   is the specific platform (solaris-sparc/solaris-i586/linux-i586/linux-amd64)

$JAIDIR is the directory into which the JAI files are to be installed

To install, change directories to $JAIDIR, unzip, untar, and set CLASSPATH as follows:

% cd $JAIDIR
% gunzip -c $downloaddir/jai-1_1_3-lib-($PLATFORM).tar.gz | tar xf -

Set CLASSPATH as follows:

% setenv JAIHOME $JAIDIR/jai-1_1_3/lib
% setenv CLASSPATH $JAIHOME/jai_core.jar:$JAIHOME/jai_codec.jar:$JAIHOME/mlibwrapper_jai.jar:$CLASSPATH
% setenv LD_LIBRARY_PATH .:$JAIHOME:$CLASSPATH

Unlike for the JRE and JDK installations, the 64-bit version Solaris platform bundles for CLASSPATH installation, jai-1_1_3-lib-sparcv9.tar.gz and jai-1_1_3-lib-amd64.tar.gz, are self-contained and will function in 64-bit mode only. If they are unpacked in the same location as the equivalent 32-bit bundle they will overwrite the files extracted from the 32-bit bundle.

It's still not working.

echo $JAIHOME
/var/lib/JAI/jai-1_1_3/lib
echo $CLASSPATH
/var/lib/JAI/jai-1_1_3/lib/jai_core.jar:/var/lib/JAI/jai-1_1_3/lib/jai_codec.jar:/var/lib/JAI/jai-1_1_3/lib/mlibwrapper_jai.jar
echo $LD_LIBRARY_PATH
.:/var/lib/JAI/jai-1_1_3/lib:/var/lib/JAI/jai-1_1_3/lib/jai_core.jar:/var/lib/JAI/jai-1_1_3/lib/jai_codec.jar:/var/lib/JAI/jai-1_1_3/lib/mlibwrapper_jai.jar

This is the Geoserver status page in case there is any relevant information: geoserver status

How can I do this?

1 Answer 1

2

I'm not sure why that section still appears in the manual - it is no longer needed or recommended, but is clearly marked as outdated.

2
  • Seeing "Native JAI ImageIO: false" on the GeoServer 2.24.2 status page made me think I had to "fix" it as it was recommended in older versions. Commented Feb 21 at 10:55
  • 1
    the manual is editable
    – Ian Turton
    Commented Feb 21 at 11:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.