<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
btw you don't need janino if you have jdt core. This is standard java,
there is no reason for this not to work, must be the way you are
setting up your classpath. Btw there is the 4.0.1 SNAPSHOT available
now. Did you rememer to add mvel?<br>
<br>
<a class="moz-txt-link-freetext" href="http://cruisecontrol.jboss.com/cc/artifacts/jboss-rules">http://cruisecontrol.jboss.com/cc/artifacts/jboss-rules</a><br>
<br>
Mark<br>
Ellen Ning Zhao wrote:
<blockquote cite="mid:46C9B44E.3040704@gmail.com" type="cite">
  <pre wrap="">I had exactly the same problem when I was evaluating the submissions
from last round. Here is a fragment from my .bashrc:

export DROOLS_HOME=/home/..../drools-4.0.0.SNAPSHOT-bin.zip_FILES/

export
CLASSPATH=$CLASSPATH:$DROOLS_HOME/drools-compiler-4.0.0.SNAPSHOT.jar:$DROOLS_HOME/drools-core-4.0.0.SNAPSHOT.jar:$DROOLS_HOME/lib/antlr-runtime-3.0.jar:$DROOLS_HOME/lib/janino-2.5.7.jar:$DROOLS_HOME/lib/core-3.2.3.v_686_R32x.jar


This did not work. As a result I had to run everything from within the
Eclipse.

MarkA wrote:
  </pre>
  <blockquote type="cite">
    <pre wrap="">I've tried that. I copied all the drools jars (14 of them) into a directory
and then used that on the classpath - didn't work.

I also searched for every jar file on my Mac, put them all in there and
tried again - failed.

It's only Drools I have a problem with, anything else I create works fine.



Manjax23 wrote:
  
    </pre>
    <blockquote type="cite">
      <pre wrap="">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
&lt;&lt;(optionally classname here)&gt;&gt;

Hope this works.

Thanks,
Manjax23



MarkA wrote:
    
      </pre>
      <blockquote type="cite">
        <pre wrap="">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:
      
        </pre>
        <blockquote type="cite">
          <pre wrap="">have a look here:

<a class="moz-txt-link-freetext" href="http://ningning.org/blog2/?page_id=122">http://ningning.org/blog2/?page_id=122</a>

MarkA wrote:
        
          </pre>
          <blockquote type="cite">
            <pre wrap="">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:
  
          
            </pre>
            <blockquote type="cite">
              <pre wrap="">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:
    
            
              </pre>
              <blockquote type="cite">
                <pre wrap="">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 &amp; 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.


  
      
              
                </pre>
              </blockquote>
              <pre wrap="">_______________________________________________
rules-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a>


    
            
              </pre>
            </blockquote>
            <pre wrap="">  
          
            </pre>
          </blockquote>
          <pre wrap="">_______________________________________________
rules-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a>


        
          </pre>
        </blockquote>
        <pre wrap="">      
        </pre>
      </blockquote>
      <pre wrap="">    
      </pre>
    </blockquote>
    <pre wrap="">  
    </pre>
  </blockquote>
  <pre wrap=""><!---->_______________________________________________
rules-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a>

  </pre>
</blockquote>
<br>
</body>
</html>