Node:Interfacing with Java, Previous:Interfacing with Tcl/Tk, Up:Interfacing with other Langauges



Interfacing with Java

Question:
I'm having basic trouble in getting Java to work. What should I do?

First try to get a simple "Hello world" program to work that does not use Jasper. A large portion of the support questions we get are unrelated to the SICStus Java interface. Once you can compile and run your own Java classes it should be relatively easy to get Jasper to work.

Read the Release Notes and the User's Manual and the section in them related to Jasper.

Question: [Windows]
splfr insists on looking for JDK in C:/jdk1.2.2

Use the --with-jdk option like this:

     splfr --with-jdk=D:/jdk1.3 ...
     
Question: [UNIX]
I want to use JDK 1.3.

As of SICStus 3.8.6 this should work. Read the release notes for important information about JDK 1.3 and JDK 1.3.1.

Question:
I want to use Jasper from an applet, but my browser won't let me. What's wrong?

Jasper is built as a layer on top of SICStus' C-Prolog interface and hence Jasper needs to be able to call methods declared as native (i.e., C functions). For security reasons, this is prohibited in applets.

This is a serious restriction, and future versions of Jasper will most likely allow connecting to the Prolog engine via sockets.

Question:
I get the message "Failed to locate bootfile" when running java ClassUsingJasper. What's wrong?

The answer to this (and related questions) can be found in the Jasper chapter of the Release Notes, section "Getting Started".