Jasper requires at least Java 2 (a.k.a. JDK 1.2) to run. Except on
Windows the full development kit, not just the JRE, is needed.
Jasper does not work with Visual J++ or Visual Café. Unless
indicated otherwise, you can download the JDK from
<http://java.sun.com
>.
Except where indicated, Jasper is built with JDK 1.3.1. On Linux, Solaris and Win32, Jasper is also tested with 1.2.2.
As of SICStus 3.9.1, it is possible to configure SICStus to use JDK 1.4. This has not been extensively tested. Please report any problems to SICStus support.
Jasper is only supported under the following configurations:
Sun's JDK 1.2.2 does not support native threads and therefore does not work.
JDK 1.3 uses signals in a way that are incompatible with the way
signals are used by the SICStus development system (sicstus
).
Most of the signal handlers used by (sicstus
) are now turned off
automatically before library(jasper)
starts Java. This appears to
make JDK 1.3 work with the SICStus development system. However,
according to the JDK 1.3 documentation this may still cause
problems. In JDK 1.3.1 the problem with conflicting uses of signals
was recognized and a Java initialization option was added to reduce
Java's use of signals; see the JDK 1.3.1 item below.
Note that this is a problem only with development systems. SICStus
run-time systems do not use signals, and for this reason, JDK 1.3 works
e.g. when embedding SICStus in Java using the Jasper package.
-Xrs
which makes JDK use signals in a way that is compatible with
the SICStus development system.
There are several ways to pass this flag to Java. The recommended way is
to pass it with jasper_initialize
:
bash> sicstus -m ... | ?- use_module(library(jasper)), jasper_initialize(['-Xrs', <other options here>], JVM).Alternatively, you can pass it using the (not documented in the JDK documentation) environment variable
_JAVA_OPTIONS
:
bash> export _JAVA_OPTIONS='-Xrs' bash> sicstus -mUsing
_JAVA_OPTIONS
is currently the only way to pass
this flag if you rely on the automatic Java initialization done when
invoking a Java foreign resource.
Note that, also for JDK 1.3.1, this is only a problem with the SICStus
development system.
DYLD_LIBRARY_PATH
be
set-up so that Java can find the SICStus run-time library. That is, you
may need to set DYLD_LIBRARY_PATH
to the location of the SICStus
run-time libsprt310.dylib
.
java -fast64
) of JDK 1.3.1 is
supported. Also see the Linux entry above.
LD_LIBRARY_PATH
to the directory where the SICStus run-time
library is located (e.g. /usr/local/lib
).
The AIX version of JDK 1.3.1 requires some environment variables to
be set before invoking an application that embeds the Java VM. For this
reason, the following environment variables should be set before starting
a SICStus executable that uses library(jasper)
:
bash$ export AIXTHREAD_SCOPE=S bash$ export AIXTHREAD_MUTEX_DEBUG=OFF bash$ export AIXTHREAD_RWLOCK_DEBUG=OFF bash$ export AIXTHREAD_COND_DEBUG=OFF bash$ export LDR_CNTRL=USERREGS bash$ sicstus -m ...
See the AIX JDK 1.3.1 readme (/usr/java131/README.HTML
) for futher details.