I think MAtt Farmer wrote:
> Hey Guys,
> I can't seem to use beans that have package names in them inside Jess. The bean
> classes work fine when I remove the package name but it gives me a
> NoClassDefFoundError when I put the package name back into the bean file.
>
You have to use the package name in Jess (or use Jess's "import"
function) *and* Jess has to find the *.class file via an appropriate
path. Jess is subject to the same kinds of problems that a Java
compiler is in this regard.
So let's say you've got a class foo.Bar:
----------------------------------------------------------------------
package foo;
public class Bar {}
----------------------------------------------------------------------
and your CLASSPATH is ".;jess.jar" (i.e., Java will look in the
current directory and in jess.jar for classes, and nowhere else).
So, if you compile foo.Bar and put Bar.class in the current directory,
then start up Jess and type
(new Bar)
you'll get an error message about the wrong name in the class file. If
you type
(new foo.Bar)
then you'll get a class not found error.
But if you do things correctly -- if you put Bar.class in a
subdirectory of the current directory called "foo", and you type
(new foo.Bar)
in Jess, it will work perfectly. These are *exactly* the same rules
that will lead to your Java compiler being able to properly work with
class foo.Bar .
You might want to look at the FAQ page about CLASSPATH at JavaRanch:
http://faq.javaranch.com/view?HowToSetTheClasspath
---------------------------------------------------------
Ernest Friedman-Hill
Science and Engineering PSEs 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]
--------------------------------------------------------------------