The SWT FAQ 中文(11)

(英文原文:http://www.eclipse.org/swt/faq.php)

翻译:Frank(frank(at)zijinshi.cn)

版本:Version 0.9

The SWT FAQ


21.问: 为什么会出现这样的错误信息 "java.lang.UnsatisfiedLinkError: libXm.so.2: cannot open shared object file: No such file or directory."?
答:在 motif 上,SWT 库要连接到 open motif 库 libXm.so.2。在大多数 平台上,作为默认设置,open motif 库已经安装,并且加到库路径里。然而,在某些Linux平台上,要么是open motif 没有安装,要么它不是磨人的库路经,或者安装了lesstif 。Eclipse (和 SWT)在安装的根目录中包含了libXm.so.2 库。(以上这段翻译得似乎有问题)

You need to either launch Eclipse from the installed directory or modify the LD_LIBRARY_PATH environment variable to include the location of libXm.so.2. 你要么在Eclipse安装的目录中加载Eclipse,要么修改LD_LIBRARY_PATH 环境变量的值以包含libXm.so.2的路径。

Note -Djava.library.path is used by the VM to locate libraries for System.loadLibrary calls. However, it does not update the LD_LIBRARY_PATH and therefore does not help libraries locate other libraries.注意:虚拟机通过调用System.loadLibrary来定位库,而Djava.library.path就是要被System.loadLibrary来使用的。然而,它并不会更新LD_LIBRARY_PATH ,所以并不会帮助定位到其它的库。

22.问:为什么会有这个警告信息: "XmParseMappingCreate() is not implemented yet" on Linux/Motif?
答:如果你正在访问安装的LessTif 库,而不是OpenMotif 库,那么就会有这个警告信息。如果看到了这个信息,你就需要在加载Eclipse之前,把eclipse 安装目录添加到LD_LIBRARY_PATH 中去。 例如,如果你使用csh:
setenv LD_LIBRARY_PATH /opt/eclipse:${LD_LIBRARY_PATH}

你可能感兴趣的:(eclipse,linux,虚拟机,PHP)