Basically the classes you are using are not present in your applications
classpath.
Put all the drools jar files and the dependent jar files in the class path
and run.
java -classpath drools.jar;drools-compiler.jar;....;SonsAgesPuzzle.jar
<<(optionally classname here)>>
Hope this works.
Thanks,
Manjax23
MarkA wrote:
Hi,
I downloaded the two examples. If I try to run the jar one I get the
classdefnotfound error:
java -jar SonsAgesPuzzle.jar
Exception in thread "main" java.lang.NoClassDefFoundError:
org/drools/WorkingMemory
Any ideas? I get this whenever I try to run my own Drools stuff outside
eclipse too (works fine inside eclipse) and it is proving a real problem.
Obvously it must be possible to create standalone programs that can be run
from jar's somehow.
Any ideas would be very welcome,
Thanks,
Mark.
Ellen Ning Zhao wrote:
>
> have a look here:
>
>
http://ningning.org/blog2/?page_id=122
>
> MarkA wrote:
>> Are there examples online somewhere then?
>>
>> I just want a few more examples to examine really. That and find out how
>> to
>> run a drools app outside of eclipse without the noclassdefound error.
>>
>> I'll keep a look out on the list.
>>
>>
>> Mark Proctor wrote:
>>
>>> Ellen runs a little "logic club" Dr Gernot Starke one the last one,
see
>>> mailing list archives for the problem. The winner gets to post the next
>>> puzzle, so stay tuned and win, so you can post your puzzle for people
>>> to
>>> try :) I believe that gernot will post the details of his solution to
>>> the blog soon.
>>>
>>> Mark
>>> MarkA wrote:
>>>
>>>> I am a big fan of the logic problem puzzles (the ones with the grids)
>>>> and
>>>> would like to play with drools to solve a few - just for a laugh and
>>>> to
>>>> see
>>>> if it can be done.
>>>>
>>>> I found a pretty simple one:
>>>> ----------------------------
>>>> Mrs. Robinson's 4th grade class took a field trip to the local zoo.
>>>> The
>>>> day
>>>> was sunny and warm - a perfect day to spend at the zoo. The kids had a
>>>> great
>>>> time and the monkeys were voted the class favorite animal. The zoo had
>>>> four
>>>> monkeys - two males and two females. It was lunchtime for the monkeys
>>>> and
>>>> as
>>>> the kids watched, each one ate a different fruit in their favorite
>>>> resting
>>>> place. Can you determine the name of each monkey, what kind of fruit
>>>> each
>>>> monkey ate, and where their favorite resting place was?
>>>> 1. Sam, who doesn't like bananas, likes sitting on the grass.
>>>> 2. The monkey who sat on the rock ate the apple. The monkey who ate
>>>> the
>>>> pear didn't sit on the tree branch.
>>>> 3. Anna sat by the stream but she didn't eat the pear.
>>>> 4. Harriet didn't sit on the tree branch. Mike doesn't like
oranges.
>>>> ---------------------
>>>>
>>>> But I can't get the logic working, has anyone done any other
examples
>>>> for
>>>> drools (or maybe converted the monkey & banana or cannibal ones from
>>>> CLIPS)?
>>>>
>>>> I have looked at the golf one in the examples but it's a bit simple.
>>>> In
>>>> that
>>>> one it uses variables for each bit $bobsColour etc. and then uses
>>>> those
>>>> in
>>>> later rules. I tried it with the one above but I kept needing to refer
>>>> to
>>>> a
>>>> variable that I hadn't yet defined and I couldn't define it as
it
>>>> needed
>>>> to
>>>> refer to another one and so on...
>>>>
>>>> Many thanks,
>>>>
>>>> Mark.
>>>>
>>>>
>>>>
>>>>
>>> _______________________________________________
>>> rules-users mailing list
>>> rules-users(a)lists.jboss.org
>>>
https://lists.jboss.org/mailman/listinfo/rules-users
>>>
>>>
>>>
>>
>>
> _______________________________________________
> rules-users mailing list
> rules-users(a)lists.jboss.org
>
https://lists.jboss.org/mailman/listinfo/rules-users
>
>