I donwnloaded swi-prolog 7.2.2.
I copied the jpl.dll file (under swipl/bin) to system32.
I created a new project in Eclipse and I put the jpl.jar in the path (like any other jar files).
Then, when I try to launch this code:
package main_package;
import org.jpl7.Query;
public class Main {
public static void main(String[] args) {
String s = "consult('lib\rules.pl')";
Query q = new Query(s); //the exception is thrown here
System.out.println(q.hasSolution());
}
}
I obtain:
Exception in thread "main" java.lang.UnsatisfiedLinkError: C:\Windows\System32\jpl.dll: Can't load IA 32-bit .dll on a AMD 64-bit platform
I read online that maybe I should change the java vm to his 32 bit version. I tried it by going to Window->Preferences->Java->Installed JREs and change the vm to the one under program x86 folder, but it did not help.
Any ideas?