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

不羁的心 提交于 2020-01-13 10:17:14

问题


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.


回答1:


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")


来源:https://stackoverflow.com/questions/914495/how-to-use-jpl-bidirectional-java-prolog-interface-on-windows

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!