I think Eric Jain wrote:
[Charset iso-8859-1 unsupported, filtering to ASCII...]
> If I have a nested class, say:
>
> public class A
> {
> public static class B { }
> }
>
> How do I get Jess to recognize it instead of throwing
> ClassNotFoundExceptions? The following approaches don't seem to work:
>
> (new A.B)
> (new A$B)
> (new "A.B")
>
A$B is the "real" name of the inner class, and should work. In fact,
[EMAIL PROTECTED] Jess61]$ cat > A.java
public class A
{
public static class B { }
}
[EMAIL PROTECTED] Jess61]$ javac A.java
[EMAIL PROTECTED] Jess61]$ java jess.Main
Jess, the Java Expert System Shell
Copyright (C) 2001 E.J. Friedman Hill and the Sandia Corporation
Jess Version 6.1p5 9/5/2003
Jess> (new A$B)
<External-Address:A$B>
Jess>
If you've got a non-static inner class, you need to provide an outer
instance as a constructor argument -- in Java, you'd write a.new B(),
but in Jess, you'd write (new A$B a) .
---------------------------------------------------------
Ernest Friedman-Hill
Distributed Systems Research Phone: (925) 294-2154
Sandia National Labs FAX: (925) 294-2234
PO Box 969, MS 9012 [EMAIL PROTECTED]
Livermore, CA 94550 http://herzberg.ca.sandia.gov
--------------------------------------------------------------------
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]
--------------------------------------------------------------------