Subject: calling prolog from Java

From: Cleidson Ronald Botelho de Souza <[email-masked]>
Date: Thu, 19 Aug 1999 18:23:49 -0300

hello,

    I am starting to use SWI-Prolog version 3.1.0 for i386-win32 and I
am trying
to call Prolog from a Java program. I wrote a Java program which calls
plcon and it works well, compiling the program, however the program does
not execute.

    My prolog program uses tell and told for writing results in a file.
If I use the interactive mode in Dos or Windows, the results are written

in the file, but if I try to compile using, for example:

   c:\pl\bin\ plcon -g hClasses -c objects

    where hClasses is the name of the predicate which I want to call
first:
        hClasses :- tell(result), write('teste'), told.

    and objects is the filename where hClasses is in.

    The results are not written in the file result !!!!

I also tried:   plcon -g hClasses -t halt -c objects     and it didn't
work.

    How can I do this? Calling a prolog program from Java and
initializes
Prolog with a predicate where it writes the results in a file?

    thanks,

        Cleidson