Sun Java program which uses a non-GUI Visual Prolog DLL

 

Copyright (c) 1984 - 1998 Prolog Development Center A/S

Written by Konstantin Ivanov

 

Note:

This example uses JNI programming technology. A support of this technology is provided in Java SDK 1.1 and higher. Use the javac.exe, javah.exe and java.exe from this SDK to compile and test the example.

 

Short description of the example: 

This example demonstrates how Java program can use Prolog code that is contained in DLL. The main target of the example is to show how Java program can pass (set*** predicates) and retrieve (get*** predicates) different types of data with the help of export functions of Visual Prolog DLL. The following Prolog data types are used: integer, real, string. The values of these types are printed to a screen before set operation and after get operation.

 

How to run the example:

Change a path to Java SDK in makefile. and go.bat files if needed.

The example uses static linking of Testdll.

To build the example: nmake -f makefile

To run the example: go.bat

 

See also: Using Visual Prolog DLL’s from other languages