JPL library - running prolong on a Java Application - Error = jpl.fli.Prolog.thread_self()I

Hi Dear,
I have a Java Application (with maven and without maven, both options) which uses
JPL.jar to run a query on swi-prolog (swipl-9.3.7-1.x64), so swi-prolog is called from an Java Application. I am using Apache Netbeans 21 to run the application. Windows is the OS host, but I also tried it on Linux and I got a similar error. I installed swi-prolog and then I added the environment variables (see screenshots below). I also have JDK 11.
Variable name: SWI_HOME_DIR
Variable value: C:\Program Files\swipl

Variable: Path
Value: …SWI_HOME_DIR\lib\jpl.jar;M2_HOME\bin

When I run the application I get the following error:

run:
Exception in thread “AWT-EventQueue-0” java.lang.UnsatisfiedLinkError: jpl.fli.Prolog.thread_self()I
at jpl.fli.Prolog.thread_self(Native Method)
at jpl.Query.open(Query.java:302)
at jpl.Util.textToTerm(Util.java:162)
at jpl.Query.(Query.java:209)
at domino1.Domino1.consultar(Domino1.java:157)
at domino1.Domino1.jButton1ActionPerformed(Domino1.java:92)
at domino1.Domino1$1.actionPerformed(Domino1.java:50)
at java.desktop/javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1967)
at java.desktop/javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2308)
at java.desktop/javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:405)
at java.desktop/javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:262)
at java.desktop/javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:279)
at java.desktop/java.awt.Component.processMouseEvent(Component.java:6635)
at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3342)
at java.desktop/java.awt.Component.processEvent(Component.java:6400)
at java.desktop/java.awt.Container.processEvent(Container.java:2263)
at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5011)
at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2321)
at java.desktop/java.awt.Component.dispatchEvent(Component.java:4843)
at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4918)
at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4547)
at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4488)
at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2307)
at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2772)
at java.desktop/java.awt.Component.dispatchEvent(Component.java:4843)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:772)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:95)
at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:745)
at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:743)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:742)
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)

Could you please check and let me know which one could be this issue? I have been working on this for two days now and I am not able to understand why I am getting this error. Or if you know how to customize a linux system (Ubuntu 20.04) to run the same Java App and swi-prolog, it will also be so so helpful.

Thanks so much in advance,
Best regards,

Hi guys,

I got it working. Just I had compatibility issues. I installed Netbeans 15 with JDK8 (1.8.0) and swi-prolog → swipl-9.3.7-1.x64. JPL.jar I used the one which is coming with the installation of prolog. I imported → import org.jpl7.*;

Best,