6

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.

Bhushan
  • 17,383
  • 27
  • 100
  • 136
user200340
  • 3,161
  • 13
  • 49
  • 73

1 Answers1

10

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.

Aaron Digulla
  • 310,263
  • 103
  • 579
  • 794