Next: , Up: PB Java Examples   [Contents][Index]


10.31.6.1 Embedding Prolog in Java Applications

If you have an advanced Prolog application that needs a GUI, then you can write a stand-alone Java application that handles the GUI and set up the Prolog server to call the right predicates in the Prolog application.

An example of how to do this can be found under the pbexamples(evaluate) directory (see the example code in PB First Example).

Another example of this is pbexamples(pbtest), which illustrates several advanced features like:

The example is run by executing the Java program PBTest:

> java -classpath "%SP_PATH%\bin\prologbeans.jar;." PBTest (Windows), or
% java -classpath "$SP_PATH/bin/prologbeans.jar:." PBTest (UNIX)

Send feedback on this subject.