`

JAI图像处理环境的搭建

    博客分类:
  • J2SE
阅读更多

1. How can I  get the JAI lib files?

https://jai.dev.java.net/binary-builds.html

I download the jai-1_1_3-lib-linux-i586.tar.gz according to my os.

 

2. The details of the lib

 

jar files:
jai_core.jar: containing core JAI class files.  required 
jai_codec.jar: JAR file containing JAI class files for doing I/O on some image formats. It is worth to point out that this so-called CODECS load and store images in various formats are deprecated in favour of using ImageIO extensions.  required 
mlibwrapper_jai.jar:JNI interfaces for exploiting native mediaLib.  required 

 

native lib:
libmlib_jai.so: mediaLib JNI shared libraries, C version.  Linux 


3. The discription of classpath and native lib use.

(1) Put the three jar files to the classpath.
(2) In case you see a warning message like the following when running your application: 

Error: Could not load mediaLib accelerator wrapper classes. Continuing in pure Java mode.

Occurs in: com.sun.media.jai.mlib.MediaLibAccessorcom.sun.media.jai.mlib.MediaLibLoadException

his means that you did not install properly the native libraries and then JAI is working in pure JAVA mode.

 

4. How to let native lib work.

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

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

 

 

reference:

1. http://java.sun.com/products/java-media/jai/INSTALL.html

2. http://docs.codehaus.org/display/GEOT/Manual+JAI+Installation

分享到:
评论
2 楼 jimmee 2010-10-29  
http://forums.java.net/jive/thread.jspa?threadID=14922
1 楼 jimmee 2010-09-21  
jai_imageio的环境配置:
http://docs.codehaus.org/display/GEOT/Manual+ImageIO+Installation
下载:
https://jai-imageio.dev.java.net/binary-builds.html

相关推荐

Global site tag (gtag.js) - Google Analytics