-## How do I make ECLIPSE know about environment variables (e.g., `SARL_VERSION`)?
+### How do I make ECLIPSE know about environment variables (e.g., `SARL_VERSION`)?
I can imagine there are other ways, but the way I made it work is by starting ECLIPSE from CLI with the variable exported already:
If you find another way that ECLIPSE can gather the environment variables (without re-defining them one by one), let me know!
-## What plugins are useful to develop on SARL in ECLIPSE?
+### What plugins are useful to develop on SARL in ECLIPSE?
On the SARL ECLIPSE distribution I install:
* The types of queries available: [One-shot vs Iterative](https://github.com/ssardina-research/packages-jpl/wiki/Types-of-Queries:-One-shot-vs-Iterative)
* How [multi-threading queries](https://github.com/ssardina-research/packages-jpl/wiki/Multi-Threaded-Queries) work under JPL.
-## Making JPL work under Mac OS
+### Making JPL work under Mac OS
Please refer to [this entry](https://github.com/ssardina-research/packages-jpl/wiki/JPL-under-Mac-OS) in the JPL wiki.
-## What does `+`, `-`, `?` mean in predicate specifications?
+### What does `+`, `-`, `?` mean in predicate specifications?
Check [here](http://www.swi-prolog.org/pldoc/man?section=preddesc)
-## What environment variables I should care about (in Linux)?
+### What environment variables I should care about (in Linux)?
Basically you need to let the system know which SWI Prolog is installed and you want to use. I run this in my Linux box as I have cloned the SWi git repo and installed it at `/usr/local/swipl-git`:
There could be many reasons and it may depend on the OS you are using.
-First of all, _do you have the **JPL package installed** in the system?_
+First of all, make sure you have SWI-Prolog installed, either:
+* Stable version 7.6.4 as per standard Linux repository or executable install from SWI page.
+* Compiled 8.1.x+ version from [swipl-devel repo](https://github.com/SWI-Prolog/swipl-devel).
+ * Note current (Feb 2019) stable 8.0.x version has a problem with `libswipl.so` which makes JPL crash.
+Second, make sure you also have the **JPL package** installed in the system. This is an additional SWI module, it is not part of the core.
* In **Windows**, it is easy as you can click to install JPL Java<-->SWI interface at installation time.
* You should see `jpl.dll` file in `%SWI_HOME_DIR%/bin` and `jpl.jar` in `%SWI_HOME_DIR%/lib`.
* In ARCH, you can generate it and install it using AUR package builder and `swi-prolog-git` package. Running the default PKG build file is enough to get JPL installed.
* In MAC, we don't know how to make it work, as there is a glitch in one of the packages built for Mac... :-( [if you make it work, please let me know!]
-Once JPL is in your system, you need to make the **system is aware** of it!
+Finally, make sure your system is aware of both SWI and JPL:
* In **Windows**, make sure:
* A system variable `SWI_HOME_DIR` points to the root of SWI install.
### Seems my SARL application cannot find JPL!
-There could be many reasons and it may depend on the OS you are using.
-First of all, _do you have the **JPL package installed** in the system?_
-* In **Windows**, it is easy as you can click to install JPL Java<-->SWI interface at installation time.
- * You should get jpl.dll file in `%SWI_HOME_DIR%/bin` and `jpl.jar` in `%SWI_HOME_DIR%/lib`.
-* In **Linux**, you need to make sure `libjpl.so` and `jpl.jar` are somewhere! If you cannot find it, then you may need to install JPL.
- * In Ubuntu, it is provided with package `swi-prolog-java`.
- * In ARCH, you can generate it and install it using AUR package builder and `swi-prolog-git` package. Running the default PKG build file is enough to get JPL installed.
- * In MAC, we don't know how to make it work, as there is a glitch in one of the packages built for Mac... :-( [if you make it work, please let me know!]
-Once JPL is in your system, you need to make the **system is aware** of it!
-* In **Windows**, make sure:
- * A system variable `SWI_HOME_DIR` points to the root of SWI install.
- * System variable `Path` includes `%SWI_HOME_DIR%\bin` and `%SWI_HOME_DIR%\lib\jpl.jar`.
-* In **Linux**, make sure:
- * `export LD_PRELOAD=libswipl.so:$LD_PRELOAD`
- * `export LD_LIBRARY_PATH=/usr/lib/swi-prolog/lib/amd64/` (or wherever `libjpl.so` is located)
+There could be many reasons and it may depend on the OS you are using. You need to have SWI-Prolog, JPL package, and the right environment variables set-up.
-With this, your SARL application should be able to recognize where JPL is (hopefully!) :-)
+Check [this question](https://bitbucket.org/snippets/ssardina/9er67X#markdown-header-my-javasarl-application-cannot-cannot-find-jpl)
-You may also refer to the instructions of the [SARL Prolog Capacity](https://bitbucket.org/ssardina-research/sarl-prolog-cap)
### Strange error in CLI when using occurence on left hand side of assignments