From crbs@ufpa.br  Thu Aug 19 23:30:57 1999
Received: from marajo.csr.ufpa.br (root@marajo.csr.ufpa.br [200.17.50.36])
	by swi.psy.uva.nl (8.9.3/8.9.3) with ESMTP id XAA18697
	for <prolog@swi.psy.uva.nl>; Thu, 19 Aug 1999 23:30:46 +0200 (MET DST)
Received: from ufpa.br (h-200-17-51-17.ufpa.br [200.17.51.17])
	by marajo.csr.ufpa.br (8.9.1a/UFPANet-1998121500) with ESMTP id SAA11794
	for <prolog@swi.psy.uva.nl>; Thu, 19 Aug 1999 18:29:27 -0300 (GMT-0300)
Message-ID: <37BC75E5.DA12283E@ufpa.br>
Date: Thu, 19 Aug 1999 18:23:49 -0300
From: Cleidson Ronald Botelho de Souza <crbs@ufpa.br>
Reply-To: crbs@ufpa.br
X-Mailer: Mozilla 4.03 [pt] (Win95; I)
MIME-Version: 1.0
To: prolog@swi.psy.uva.nl
Subject: calling prolog from Java
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Content-Transfer-Encoding: 7bit

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

