1

I've been desperately trying to get JPL (Java/SWI-Prolog interface) to work on Mac using those instructions: https://ssardina-research.github.io/packages-jpl/DeploymentMacos

I have fixed all the dependencies link on libjpl.dylip, both for the one in /Applications/SWI-Prolog.app/Contents/swipl/lib/fat-darwin and the one I copied (as instructed) into /usr/local/Cellar/swi-prolog/9.0.4/libexec/lib/swipl/lib/x86_64-darwin/

Indeed in both case I have the correct absolute paths:

libjpl.dylib (architecture x86_64):
    @rpath/libjpl.dylib (compatibility version 0.0.0, current version 0.0.0)
    /Library/Java/JavaVirtualMachines/jdk-17.jdk/Contents/Home/lib/server/libjvm.dylib (compatibility version 1.0.0, current version 1.0.0)
    /usr/local/Cellar/swi-prolog/9.0.4/libexec/lib/swipl/lib/x86_64-darwin/libswipl.9.0.4.dylib (compatibility version 9.0.0, current version 9.0.3)
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1319.0.0)

I do have -Djava.library.path=/usr/local/Cellar/swi-prolog/9.0.4/libexec/lib/swipl/lib/x86_64-darwin/ specified as argument in my application configuration in IntelliJ

I also tried the other location: -Djava.library.path=/Applications/SWI-Prolog.app/Contents/swipl/lib/fat-darwin

I have tried on JDK 17 and JDK 1.8.

I'm running out of options and my understanding of Java is too limited to try other options. Also, there is limited help on getting JPL work on Mac OS and IntelliJ.

Any hint would be greatly appreciated.

1 Answers1

0

Well, it looks like my mistake was to put the VM argument -Djava.library.path=/... in the program arguments field...

Why did IntelliJ remove the VM argument field as a field by default in the configurations? It's quite misleading.

I made a video for those who are struggling to install JPL on Mac OS: https://youtu.be/gm12Kf8CBSQ