Installing Kahina for SWI-Prolog
On this page, you find step-by-step instructions for downloading and installing Kahina for SWI-Prolog.
Prerequisites
Java
Kahina requires a Java Runtime Environment (JRE, version 6 or higher) to run. If a JRE is not yet installed on your computer, then use your operating system's package manager or a downloadable installer (e.g. from Oracle) to install one.
SWI-Prolog and JPL
You need a working installation of SWI-Prolog, including the JPL package (a Prolog-Java interface). To get it, download the installer or source archive appropriate for your system. If you are on Windows, just run the installer. If your system is Unix-like (most commonly, Linux or Mac OS X), then building from source is the recommended way of installing SWI-Prolog. Both ways of installing should also install the JPL package by default. An alternative way is to use a software package, which may or may not work. In particular, Ubuntu 10.04's swi-prolog-jpl package is known to be broken, which will prevent Kahina for SWI-Prolog from running.
Some black magic may be required in order for JPL to find the shared objects libjava.so and libjvm.so. In a typical installation, this amounts to adding the following line to your $HOME/.bashrc (adapt the paths to match your setup):
export LD_LIBRARY_PATH=/usr/local/lib/swipl-5.10.5/lib/i686-linux:/usr/lib/jvm/java-6-sun/jre/lib/i386:/usr/lib/jvm/java-6-sun/jre/lib/i386/client:$LD_LIBRARY_PATH
Obtaining Kahina
You have two options: either download the current binary release, or check-out and compile the latest code.
Either: Download the current binary release
Go to the downloads page and grab the latest release. It is in the form of a zip archive which will unpack to a directory called kahina. You can put it wherever you want - the directory $HOME/opt is a good choice on Unix-like operatings systems, and for Windows, we recommend C:\Program Files. We will henceforth refer to it as the kahina directory, or kahina for short.
Or: Check-out and compile the latest code
These instructions presuppose you have Subversion, Apache Ant and a Java Development Kit (JDK, version 6 or higher) installed.
Obtain Kahina by checking it out from our Subversion repository, e.g. using the following command from a convenient directory:
svn checkout https://github.com/texttheater/kahina kahina
This will checkout Kahina into a new directory called kahina. We will henceforth refer to it as the kahina directory, or kahina for short. cd into this directory, then run the following command to build Kahina:
ant
Setting up Kahina for SWI-Prolog
Finally, make sure your CLASSPATH contains the bin directory inside the kahina directory, as well as jedit-textArea.jar in the lib directory, before running SWI-Prolog.
Using Kahina for SWI-Prolog
Get started by having a look at the First Steps.
Attachments (2)
- kahinaswi-test.pl (121 bytes) - added by ke 8 years ago.
- kahinaswi-test-tree.png (11.5 KB) - added by ke 8 years ago.
Download all attachments as: .zip