Search Mailing List Archives

Limit search to: Subject & Body Subject Author
Sort by: Reverse Sort
Limit to: All This Week Last Week This Month Last Month
Select Date Range     through    

[protege-discussion] jess,jesstab and protege-frame in applet.

anne neldel anne-neldel at
Wed Apr 30 04:35:33 PDT 2008

hello everybody,

I work with Protege-frame, Jess, JessTab and Eclipse, and my goal is to
build an applet using these tools. this is what I can not achieve. 

The ontology that I used to represent you my problem consists of a single
class called person represented by two slots name and age and having 5
To try to achieve this applet I used the codes below: 

JAVA Code :

import java.awt.Container;

import javax.swing.JApplet;
import javax.swing.JComboBox;
import javax.swing.JPanel;

import jess.JessException;
import jess.QueryResult;
import jess.Rete;
import jess.ValueVector;
import JessTab.JessTabFunctions;

public class app extends JApplet 
public void init ()
		pan = new JPanel ();
		contenu = getContentPane() ;
		contenu.add(pan) ;
		combo = new JComboBox() ;
		pan.add(combo) ;
		Rete moteur = new Rete();
		moteur.addUserpackage(new JessTabFunctions());
		try {moteur.executeCommand("(load-project onto.pprj)");}
			catch (JessException e) {e.printStackTrace();}
		try {moteur.batch("exp.clp");}
			catch (JessException e) {e.printStackTrace();}
		try {moteur.executeCommand("(run)");}
			catch (JessException e) {e.printStackTrace();}
		try {moteur.eval("(defquery quer (object (is-a person)(name ?n) (age
			catch (JessException e) {e.printStackTrace();}
		QueryResult champ = null;
		try {champ = moteur.runQueryStar("quer",new ValueVector() );}
			catch (JessException e) {e.printStackTrace();}
			try {combo.addItem(champ.getString("n")+"  "+champ.getInt("a"));}
				catch (JessException e) {e.printStackTrace();} 
	private JComboBox combo;
	private JPanel pan;
	private Container contenu;


JESS Code : exp.clp


(mapclass person)

While viewing the applet with Eclipse, it works without problem. But when I
try to include it in an HTML page using the code below, it does not 


code= "app.class" 

Knowing that I put in a single file the following elements:

- app.class
- the Jess program
- the ontology (onto.pprj, ontp.pins, onto.pont)
- the jars : protege.jar, JessTab12.jar, jess.jar
- the  HTML page

thank you in advance.

View this message in context:
Sent from the Protege - General mailing list archive at

More information about the protege-discussion mailing list