Eclipse与$ LD_LIBRARY_PATH [英] Eclipse with $LD_LIBRARY_PATH

查看:651
本文介绍了Eclipse与$ LD_LIBRARY_PATH的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一些使用JNI在/ usr / local / lib /目录中构建的库文件。



如果我从午餐启动Eclipse,该路径永远不会被Eclipse接收,所以我需要指定-Djava.library.path到运行配置。 p>

但是,如果我从命令行启动Eclipse。有没有人知道为什么它的行为像这样,以及如何配置它从午餐会知道/ usr / local / lib /路径。谢谢。



我在Ubuntu操作系统上使用Eclipse SDK版本:3.6.2。

解决方案

这可能是因为您的shell在其中一个启动脚本中执行 export LD_LIBRARY_PATH = ...



启动器不运行,所以变量未设置。



解决方法:编写一个设置 LD_LIBRARY_PATH 并启动Eclipse(使用 exec eclipse ,如果你想避免一个无用的进程挂起,直到Eclipse退出)。



或者,编辑 eclipse.ini 并添加 -Djava.library.path = ... $ -vmargs



要验证这是否正常,请打开帮助/关于Eclipse /安装详细信息/配置 。路径应显示在对话框中作为系统属性。


I have some library files built using JNI in the directory /usr/local/lib/.

If i start the Eclipse from luncher, the path is never picked up by Eclipse, so I need to specify -Djava.library.path to the Run Configurations.

But if I start the Eclipse from command line. It seems working fine.

Does anyone know why it behaves like this and How to configure it to known the /usr/local/lib/ path from luncher. Thanks.

I am using Eclipse SDK Version: 3.6.2, on Ubuntu OS.

解决方案

That is probably because your shell executes export LD_LIBRARY_PATH=... in one of the startup scripts.

The launcher doesn't run those, so the variable isn't set.

The workaround: Write a small script that sets LD_LIBRARY_PATH and starts Eclipse (use exec eclipse if you want to avoid a useless process hanging around until Eclipse exits).

Alternatively, edit eclipse.ini and add -Djava.library.path=... after -vmargs

To verify that this works, open Help / About Eclipse / Installation Details / Configuration. The path should show up in the dialog as a System property.

这篇关于Eclipse与$ LD_LIBRARY_PATH的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆