Eclipse with $ LD_LIBRARY_PATH

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

If I started Eclipse from luncher, the path will never be selected by Eclipse, so I need to specify -Djava.library.path for Run Configurations.

But if I started Eclipse from the command line. It seems to be working fine.

Does anyone know why it behaves this way and how to configure it to the famous path / usr / local / lib / from luncher. Thanks.

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

+6
source share
1 answer

Perhaps this is because your shell executes export LD_LIBRARY_PATH=... in one of the startup scripts.

The launcher does not start them, so the variable is not set.

Workaround: write a small script that sets LD_LIBRARY_PATH and starts Eclipse (use exec eclipse if you want to avoid a useless process that hangs before 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 appear as a System property in the dialog box.

+9
source

Source: https://habr.com/ru/post/892585/


All Articles