From p.singleton@keele.ac.uk  Tue Aug 15 16:34:21 2000
Received: from mail4.svr.pol.co.uk (mail4.svr.pol.co.uk [195.92.193.211])
	by swi.psy.uva.nl (8.9.3/8.9.3) with ESMTP id QAA26321
	for <prolog@swi.psy.uva.nl>; Tue, 15 Aug 2000 16:34:05 +0200 (MET DST)
Received: from modem4294967293.fashion.dialup.pol.co.uk ([195.92.4.131] helo=keele.ac.uk)
	by mail4.svr.pol.co.uk with esmtp (Exim 3.13 #0)
	id 13Ohm2-0001vQ-00; Tue, 15 Aug 2000 15:33:03 +0100
Message-ID: <39995448.4EF16674@keele.ac.uk>
Date: Tue, 15 Aug 2000 15:31:36 +0100
From: Paul Singleton <p.singleton@keele.ac.uk>
Organization: SmartArts Computing Consultancy
X-Mailer: Mozilla 4.74 [en] (WinNT; U)
X-Accept-Language: en
MIME-Version: 1.0
To: "=?iso-8859-1?Q?S=E9rgio?= Roberto P. da Silva" <srsilva@inf.puc-rio.br>
CC: prolog@swi.psy.uva.nl
Subject: Re: Java + SWI Prolog in Windows environment
References: <4.3.2.7.0.20000815103645.00bc89c0@exu.inf.puc-rio.br>
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit

"Sérgio Roberto P. da Silva" wrote:

> I´d like to know if there is any interface between Java and SWI that works
> in the Windows enviroment (to be straight in Windows NT).
> I´m implementing a frame system in prolog (with the same functionality of
> FRAMEKIT) and I would like to create an  interface for it in Java.

I have a SWI-Prolog-calls-Java interface; should be portable but was developed
and is currently used on Windows NT4.  It's completely dynamic: classes can
be instantiated by name, methods and fields are accessed by name, parameters
are type-checked and converted at every call.  It relies on Java reflection,
caches lotsa method metadata, and there's scope for making it more efficient,
but 

You can build GUIs on-the-fly, and queue events within Java, then your Prolog
code can fetch them (blocking or non-blocking) and handle them.

It really needs more tidying up before I offer it as a SWI-Prolog package, but
I'll see what I can get done today (including writing some documentation :-)

I regards this as the "other half" of Fred Dushin's JPL. and I'm inclined to
rename all my stuff as "JPL" and 'jpl_' etc. and combine them into a single
offering (I stupidly called mine "JSP", being unaware of "Java Server Pages"
:-) but I haven't asked Fred about this...

Paul Singleton

