So, today I finally got the jpl (Java / Prolog API) up running inside Bioclipse, succeeding with compiling a simple test prolog program (The "test 0" in the "Test" example supplied with SWI-Prolog). Only talking to swi-prolog so far though, not blipkit. Starting blipkit includes loading prolog files etc. as specified in the blipkit startup script, so will have to study that in more detail.
The missing thing was to link to the folder where libjpl.so is located. I had to do this in the blipkit.product file, in the vmArgs tag, with the -Djava.library.path=/usr/local/lib/pl-5.7.15/lib/i686-linux
We will (later) need to figure out a good way to package the os/architecture specific (native) libraries so that the correct version is run on each operating system.
One option that someone mentioned (link in separate blog post) is to include the .so file (and the other files, specific for each platform) in the plug-in root folder, and then using the Eclipse-PlatformFilter header in the Manifest to specify a rule for platforms. It seems this rule only specifies which platform is required by the current project's Manifest file, so it seems one needs to create separate fragments for each platform (they are kind of semi-projects, with their own Manifest.MF file). Ola has done that for the Balloon plugin (which is running native c/c++ code), though he doesn't seem to have used the Eclipse-PlatformFilter header, but some other method, to determine which fragment to run. Gotta ask him for hints.
My ideas of next steps (with loose sorting):
~/.plrc
, because this file is read even when starting prolog from the jpl api. The only thing that has still to be solved then is the flags that are passed to the Prolog binary on startup.Later, if time admits:
Comments
Planet Bioclipse
Please tag this one to show up on Planet Bioclipse.
Ok fixed (Have felt unsure
Ok fixed (Have felt unsure about what posts should go in there and which do not, but I guess I'll learn with time :) )