next up previous contents index
Next: Installation Up: manual Previous: Calling Prolog from C   Contents   Index

External Language Interface with Java

As the popularity of Java grows, an interface that bridges Prolog and Java becomes more and more important. On the one hand, Prolog applications can have access to resources in Java, such as the Abstract Window Toolkit(AWT) and networking. On the other hand, Java programs can have access to the functionalities such as constraint solving available in Prolog. B-Prolog has a bi-directional interface with Java, which is based on JIPL developed by Nobukuni Kino.

An application that uses the Java interface usually works as follows: The Java part invokes a Prolog predicate and passes it a Java object together with other arguments; the Prolog predicate performs necessary computation and invokes the methods or directly manipulates the fields of the Java object. The readers are recommended to see the examples at the directory $BPDIR/Examples/Java before writing their own applications.



Subsections

Neng-Fa Zhou
1999-11-24