Now that's easy. You have two options:
Both options will give exactly the same results.
sudo port install swi-prolog
Both methods install SWI-Prolog in /opt/local/
:
/opt/local/bin/swipl
(add /opt/local/bin
to your PATH if you - or the MacPorts installer - haven't already done so)/opt/local/lib/swipl-<version>
To test if it works:
/opt/local/lib/swipl-<version>/doc/packages/examples/jpl/java/Test
rm Test.class
./run.sh
- this should compile Test.java (in the absence of Test.class) and run it.bash-3.2# ./run.sh Compiling Test JPL demo: Test test 0...% test.pl compiled 0.00 sec, 4,064 bytes passed. test 1...passed. test 2...passed. test 3...passed. test 4...passed. test 5...passed. test 6...passed. test 7...passed. test 8...passed. test 9...passed. test 10...passed. test 11...passed. test 101...00004567182904567231901235678312041678321528904567312936890412738905683412794156842736189057340412506823420839420831756240819623751407856239104837562910482956804237195684739158764391584763596579576799passed.