Look at the tank and pumps example code.
There are two things you need to do:
1. make the class Alex public (the default is package scoping,
and that's why Jess can't find the constructor as you have it.)
2. Add property change support to your class.
----------
George Rudolph
Mad Scientist
Motorola SSG
----------
> -----Original Message-----
> From: Ashraf Afifi [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, February 08, 2000 11:53 AM
> To: [EMAIL PROTECTED]
> Subject: JESS: problem using new
>
>
>
>
>
> I wrote the following sample Class and copied it in the jess
> directory and
> compile:
>
> package jess;
>
> class Alex{
> public String m_property;
> public void setProperty( String s){
> m_property = s;
> }
>
> public String getProperty(){
> return m_property;
> }
>
> }
>
> In jess, when I write (bind ?a (new Alex))
> I get the error message: Constructor not found jess.Alex...
>
> If I add to the java class the line:
> public Alex(){}
>
> and repeat the same test, I get the message: Class or Constructor not
> accessible.
>
> What am I missing?
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, send the words 'unsubscribe jess-users
> [EMAIL PROTECTED]'
> in the BODY of a message to [EMAIL PROTECTED], NOT to the
> list (use your own address!) List problems? Notify
> [EMAIL PROTECTED]
> ---------------------------------------------------------------------
>
---------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
in the BODY of a message to [EMAIL PROTECTED], NOT to the
list (use your own address!) List problems? Notify [EMAIL PROTECTED]
---------------------------------------------------------------------