An error occurred while trying to install the jpl library. jpl.dll: cannot find dependent libraries

I have a problem installing the jpl library. I installed the latest version of swipl (but before I tried unstable versions):

SWI-Prolog 7.2.3 for Windows 7/8/10 64-bit edition 

Then I added the dependent paths to the environment variables:

 Variable: SWI_HOME_DIR Value: C:\Program Files\swipl 

Then I added the following values ​​to Path :

 %SWI_HOME_DIR%\lib\jpl.jar; %SWI_HOME_DIR%\lib; %SWI_HOME_DIR%\bin 

I also added a VM argument as follows:

 -Djava.library.path="C:\Program Files\swipl\bin" 

to make sure that Eclipse sees this folder.

After that, I still get the error:

 Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: C:\Program Files\swipl\bin\jpl.dll: Can't find dependent libraries at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1937) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1855) at java.lang.Runtime.loadLibrary0(Runtime.java:870) at java.lang.System.loadLibrary(System.java:1122) at org.jpl7.JPL.loadNativeLibrary(JPL.java:79) at org.jpl7.fli.Prolog.<clinit>(Prolog.java:41) at org.jpl7.Query.open(Query.java:260) at org.jpl7.Util.textToTerm(Util.java:102) at org.jpl7.Query.Query1(Query.java:129) at org.jpl7.Query.<init>(Query.java:120) 

I am 100% sure that Eclipse sees this jpl.dll file, but, in my opinion, it seems that it needs other libraries.

I know that this thread probably duplicates any of them:

jpl.dll: cannot find dependent libraries
JPL Cannot find jpl.dll dependent libraries

but these questions do not answer or the answers do not help in my case.

+5
source share
1 answer

I added dependent paths to environment variables: Variable: SWI_HOME_DIR

Value: C:\Program Files\swipl

Then I added the following values ​​to Path :

%SWI_HOME_DIR%\lib\jpl.jar;
%SWI_HOME_DIR%\lib;

%SWI_HOME_DIR%\bin

These are the installation instructions:

Put three library files ( jpl.dll , jpl.jar and jpl.pl ) where each can be found:

  • jpl.dll must be found by the Windows kernel , and it can work in any in your PATH variable; maybe %SWI_HOME_DIR%\bin or the Windows system folder

  • jpl.jar should be found by any Java VM (and compilers) with JPL . One possibility is to put it in your global CLASSPATH .

  • jpl.pl is the Prolog source module and should be found by any SWI-Prolog engines used with JPL : I suggest putting it in %SWI_HOME_DIR%\library and then calling make_library_index/1 in this folder (see the SWI-Prolog manual for details) so that the autoloader can find it.

0
source

Source: https://habr.com/ru/post/1262599/


All Articles