|How can Eclipse set the Environment variable "LD_LIBRARY_PATH" on Mac OS [message #1781803]
||Tue, 13 February 2018 11:25
| Ivan Morelli
Registered: February 2018
I'm going mad... I'm writing a java program that needs to use some native libraries (written in C) on Mac, and everything works fine on Eclipse: setting up a specific Configuration in "Run Configuration" adding "LD_LIBRARY_PATH" in the environment tab.|
Now, this application, needs to be executed as a standalone app, so I need to execute it outside Eclipse...but if I execute the jar in the terminal just after having exported the variable:
nothing works,I get the " java.lang.UnsatisfiedLinkError" exception, and printing the value of the variable I see it's empty. I have done a lot of searches on internet and as far as I understood this is happening because of "System Integrity Protection" new feature in MacOS... So apparently there is no way to set environment variables starting with DYLD_* and LD*. because they will be in any case ignored .
So, which kind of magic stuff is doing Eclipse in order to achieve this?
Any help will be appreciated...
Powered by FUDForum
. Page generated in 0.01872 seconds