AgentBase for SICStus Prolog
String str = textField.getText() to make the
variable str contain the text of textField. In scripted Java you would write
str = textField.getText()
For more information about the syntax,
etc of BeanShell please look at http://www.beanshell.org.
Initialization
Executing code
Initialization
Executing code
Callbacks
multi user example
Copyright © 2001
SICS AB, All Rights Reserved.Jeval - Java Evaluation for SICStus
Jeval is a package that enable SICStus developers to make full use of
the strengths of Java (GUI, networking, etc). Using jeval it is possible and
easy to develop the core functionality of the application in prolog
and the user interface in Java.
Different Modes - Single/Multi user
The jeval package allow the user to decide if the prolog or the Java code should
be the server. When prolog acts as server jeval can handle multiple users
(connections) to the application. When Java is the server only one user/GUI
can be handled.Scripted Java Code
Jeval uses the BeanShell scripting package to implement the execution of Java
code from prolog. The syntax of BeanShell scripted Java is close to Java and
the most obvious difference is that you do not need to declare variables.
In Java you would write Using Single User Jeval
Jeval in single user (single gui) mode is good when you have one or several
prolog processes running and you only need one GUI.
Import is a list of Java packages to import.
Using Multi User Jeval
Multi user Jeval is an excellent choice when you have an application that is
used by multiple users and need a more interactive user interface than a
html-based web interface. In this case prolog acts as a server and users
typically connect through applets via a web-browser.