1# Deploying for users - on Windows
2
3Tested successfully in Windows 7 with SWI 7.6.4.
4
5* Make sure SWI is installed with the JPL Java-SWI connectivity. You should have a `jpl.dll` (in the SWI `bin/` subdir) and a `jpl.jar` (in the SWI `lib/` subdir).
6* Define a _system_ environment variable `SWI_HOME_DIR` and set it to the root directory of your installed version of SWI-Prolog (e.g., to `C:\Program Files\swipl`).
7    * Extend `Path` system environment variable with the following two components:
8        * `%SWI_HOME_DIR%\bin`
9        * `%SWI_HOME_DIR%\lib\jpl.jar`
10* No changes to `CLASSPATH` are needed.
11
12## Reported problems
13
14Problems have been reported using latest versions of JDK beyond version 8: check [here](https://github.com/SWI-Prolog/packages-jpl/issues/34).
15
16
17---------------------
18
19## Troubleshooting
20
21If the example programs don't run successfully, look carefully at any error messages; they typically indicate where the problem lies.  Then check the installation instruction s and prerequisites carefully.
22
23 * If you get a message about
24
25        ... jpl.dll ... Access is denied ...
26
27    then you may have lost execute permission on `jpl.dll` (please consult local Windows expertise if you don't know how to correct this).
28
29 * If `jpl_examples/0` complains that
30
31        The dynamic link library jvm.dll could not be found in the specified path
32
33    then you should locate jvm.dll within the Java runtime which you intend to use, and ensure that its directory is within the `PATH`.
34
35 * If the Java examples (e.g. `jpl\examples\Exception\run.bat`) complain that
36
37        The name specified is not recognized as an internal or external command, operable program or batch file.
38
39     then there is no Java executable java.exe in any folder on your `PATH`: you should have a `PATH` entry such as `C:\jdk1.3.1_01\bin;`
40
41 * If the Java examples complain that
42
43        The dynamic link library libpl.dll could not be found in the specified path
44     or
45
46        Exception in thread "main" java.lang.UnsatisfiedLinkError: C:\paul\bin\jpl.dll: Can't find dependent libraries
47
48     then there is no SWI-Prolog library `libpl.dll` in any folder on your `PATH`: you should have a `PATH` entry such as `C:\Program Files\pl\bin`
49