我正在尝试在 Mac OS X 10.6 上运行的 Eclipse 中使用以下导入:
import javax.media.jai.JAI;
不幸的是,这不起作用,而是我收到以下消息:
“访问限制:由于所需库 /System/Library/Java/Extensions/jai_core.jar 的限制,无法访问 JAI 类型”
如何解决?我想用JAI.create("fileload", "filename");
文件夹扩展中的文件权限:
$ ls -l
total 20536
-rwxrwxr-x 1 root wheel 6470 6 Jan 19:20 AppleScriptEngine.jar
-rwxrwxr-x 1 root wheel 12838 23 Apr 18:16 MRJToolkit.jar
-rwxrwxr-x 1 root wheel 938700 3 Mar 01:41 QTJava.zip
-rwxrwxr-x 1 root wheel 17786 11 Feb 13:49 dns_sd.jar
-rwxrwxr-x 1 root wheel 1223487 21 Jul 2009 j3daudio.jar
-rwxrwxr-x 1 root wheel 1157342 21 Jul 2009 j3dcore.jar
-rwxrwxr-x 1 root wheel 685292 21 Jul 2009 j3dutils.jar
-rwxrwxr-x 1 root wheel 275486 18 May 2009 jai_codec.jar
-rwxrwxr-x 1 root wheel 1544537 18 May 2009 jai_core.jar
-rwxrwxr-x 1 root wheel 106688 6 Jan 19:20 libAppleScriptEngine.jnilib
-rwxrwxr-x 1 root wheel 427632 21 Jul 2009 libJ3D.jnilib
-rwxrwxr-x 1 root wheel 733280 21 Jul 2009 libJ3DAudio.jnilib
-rwxrwxr-x 1 root wheel 50880 21 Jul 2009 libJ3DUtils.jnilib
-rwxrwxr-x 1 root wheel 1004544 3 Mar 01:44 libQTJNative.jnilib
-rwxrwxr-x 1 root wheel 50352 23 Dec 10:25 libShark.jnilib
-rwxrwxr-x 1 root wheel 9959424 18 May 2009 libmlib_jai.jnilib
-rwxrwxr-x 1 root wheel 41239 18 May 2009 mlibwrapper_jai.jar
-rwxrwxr-x 1 root wheel 127628 21 Jul 2009 vecmath.jar
可以在此处找到快速修复:http: //lkamal.blogspot.com/2008/09/eclipse-access-restriction-on-library.html(但是,它更像是一种解决方法......)