[SOLVED] How to set java.library.path for an Eclipse/Bioclipse plugin?

EDIT: Se solution at the bottom of the page

I'm trying to set the java.library.path system setting for my Bioclipse manager/Eclipse plugin.

Normally, if running java from command line, this variable should be set like so (According to what I've googled up):

java -Djava.library.path=/usr/local/lib/pl-5.7.15/lib/i686-linux/JavaClassName

so I have tried to add the line

-Djava.library.path="/usr/local/lib/pl-5.7.15/lib/i686-linux/"

to the arguments in "Run" > "Run configurations" for my plugin's product file, under the "arguments" tab. But that does not work. I don't see the string above when I output the java.library.path in my program with the following code:
return System.getProperty("java.library.path")

(This is returned to the Bioclipse JS Console)
I see a lot of paths to the java vm:s et.c. but not the path I'm trying to set.

I've found some hints about how to do that for normal Eclipse projects. But I haven't succeded getting it to work, so could it has to be done in a special way in Bioclipse?

Any hints are most welcome

More info

When I try to run a simple test (From the attached java examples) accessing the Jpl and running a prolog query, I get first this error:

Caused by: java.lang.UnsatisfiedLinkError: no jpl in java.library.path
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1682)
    at java.lang.Runtime.loadLibrary0(Runtime.java:822)
    at java.lang.System.loadLibrary(System.java:993)
    at jpl.JPL.loadNativeLibrary(JPL.java:100)
    at jpl.fli.Prolog.<clinit>(Prolog.java:85)
    at jpl.Query.open(Query.java:286)
    at jpl.Util.textToTerm(Util.java:162)
    at jpl.Query.<init>(Query.java:198)
    at net.bioclipse.blipkit.business.BlipkitManager.test(BlipkitManager.java:34)
    ... 45 more

Next time I run the same function I get this error:

...
Caused by: java.lang.NoClassDefFoundError
    at jpl.Query.open(Query.java:286)
    at jpl.Util.textToTerm(Util.java:162)
    at jpl.Query.<init>(Query.java:198)
    at net.bioclipse.blipkit.business.BlipkitManager.test(BlipkitManager.java:34)
    ... 45 more

Installed files

The interesting files in this case seem to be

/usr/local/lib/pl-5.7.15/lib/i686-linux/libjpl.so

and
/usr/local/lib/pl-5.7.15/lib/jpl.jar

Some Links

Solution

I needed to edit the [managername].product file in text mode, and added a parameter that set the java.library.path in the launcherArgs > vmArgs tag, like so (See the end of the vmArgs tag):

<launcherArgs>
 <programArgs>-consolelog -data &quot;@nodefault&quot; -noUpdate</programArgs>
 <vmArgs>-ea  -Xmx512M -XX:MaxPermSize=128m -Djava.library.path=/usr/local/lib/pl-5.7.15/lib/i686-linux</vmArgs>
 <vmArgsMac>-XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts</vmArgsMac>
</launcherArgs>

Java / Prolog communication now seems to work. Will have to see if there are better ways to load / encapsulate the library (libjpl.so, which is located in /usr/local/lib/pl-5.7.15/lib/i686-linux) though, or whether it is possible to include it as source code.