Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use JPL (bidirectional Java/Prolog interface) on windows?

I'm interested in embedding a Prolog interpreter in Java. One option is using JPL, but the download links on the JPL site are broken, and the installation page mentions a jpl.zip that I can't find. I downloaded SWI-Prolog which seems to include JPL (it lists it as a component when installing), but I'm still not sure how I'd use it along with Java.

Any ideas on how to use JPL on Windows? Is there another library I could use to achieve the same thing? I've come across a few but they don't seem as stable as JPL.

like image 338
Firas Assaad Avatar asked May 27 '09 08:05

Firas Assaad


1 Answers

JPL is no longer an additional download, so you don't need jpl.zip. If you download SWI-Prolog, it will install the necessary files. In comparison to the structure of jpl.zip shown in the installation notes, you'll find it now looks like this:

C:\Program Files\Prolog\
 +--- doc\packages\examples\jpl
 |     +--- Exceptions
 |     +--- Exceptions2
 |     +--- Family
 |     +--- Test
 |     +--- Test2
 |     +--- Time
 |     +--- Zahed
 |     +--- (and maybe more...)
 |
 +--- bin\jpl.dll  (a native library - for Windows in this case)
 |
 +--- lib\jpl.jar  (a Java library)
 |
 +--- library\jpl.pl  (a Prolog library)
 |
 +--- doc\packages\jpl\index.html  (JPL's documentation "home page")
like image 137
Pesto Avatar answered Sep 28 '22 07:09

Pesto