Help!!!!!! JPL java prolog
947418Jul 4 2012 — edited Jul 5 2012Hello,
I have a good project to do with it is a prolog system question / answer, I want to create an interface in java with eclipse that interacts with a prolog file, after more research online I found that JPL is the only solution to integrate prolog in Java, I followed some steps on eclipse with a small example but it still shows me the same exception:
Exception in thread "main" java.lang.UnsatisfiedLinkError: no jpl in java.library.path
at java.lang.ClassLoader.loadLibrary (ClassLoader.java: 1758)
Has java.lang.Runtime.loadLibrary0 (Runtime.java: 823)
at java.lang.System.loadLibrary (System.java: 1045)
Has jpl.JPL.loadNativeLibrary (JPL.java: 100)
Has jpl.fli.Prolog. <clinit> (Prolog.java: 85)
Has jpl.Query.open (Query.java: 286)
Has jpl.Util.textToTerm (Util.java: 162)
Has jpl.Query.Query1 (Query.java: 183)
Has jpl.Query. <init> (Query.java: 176)
Has aaa.main (aaa.java: 10)
Although I added jpl.jar in the project, here is my little code:
import java.lang. *;
import jpl. *;
import java.io. *;
public class aaa
{
public static void main (String [] args)
{
Query q1 = new Query ("consult", new Term [] {new Atom ("test.pl")});
System.out.println ("consult" + (q1.query ()? "Succeeded": "failed"));
}
}
Is there anyone who can help me please?? I'm really stuck
Thank you in advance