I noticed this when I was playing with some code last night. If I try to use the following from the doco<br><br><pre class="programlisting">PackageBuilderConfiguration cfg = new PackageBuilderConfiguration( );<br>JavaDialectConfiguration javaConf = (JavaDialectConfiguration)
cfg.getDialectConfiguration( "java" );<br>javaConf.setCompiler( JavaDialectConfiguration.JANINO ); <br><br>I get the error you are seeing when trying to instantiate a PackageBuilderConfiguration. <br><br>However if I use the following
<br></pre><br><pre class="programlisting">Properties properties = new Properties();<br>properties.setProperty( "drools.dialect.java.compiler",<br> "JANINO" );<br>PackageBuilderConfiguration cfg = new PackageBuilderConfiguration( properties );
<br>JavaDialectConfiguration javaConf = (JavaDialectConfiguration) cfg.getDialectConfiguration( "java" );<br>assertEquals( JavaDialectConfiguration.JANINO,<br> javaConf.getCompiler() ); // demonstrate that the compiler is correctly configured
</pre><br>Janino seems to work ok. Looks like the default constructor for a PackageBuilderConfiguration needs to be able to locate the Eclipse JDT classes.<br><br><div><span class="gmail_quote">On 9/5/07, <b class="gmail_sendername">
Garry Brother</b> <<a href="mailto:gmbroth@hotmail.com">gmbroth@hotmail.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><div style="text-align: left;">Hi,<br><br>After two (unsuccessful) attempts at downloading and running<br>the drools examples, I'm ready to throw in the towel. Before I<br>do that, however, I'm going to beg for help.
<br><br>With ant, I was able to build the examples using the following<br>classpath:<br><br> <path id="drools.jars" ><br> <fileset dir="${drools.home}" ><br> <include name="*.jar"/>
<br> </fileset><br> </path><br><br> <target name="compile"><br> <mkdir dir="target"/><br> <mkdir dir="target/classes"/> <br> <br> <copy todir="target/classes">
<br> <fileset dir="src/main/resources"/><br> <fileset dir="src/main/rules"/><br> </copy> <br> <br> <javac srcdir="src/main/java"
<br> destdir="target/classes"<br> source="1.4"><br> <classpath ><br> <path refid="drools.jars" /> <br> <fileset dir="lib">
<br> <include name="*.jar"/><br> </fileset><br> </classpath><br> </javac> <br> </target> <br><br>All attempts to run the "run-waltz12" example fail regardless
<br>of what classes I throw at it. I tried both "drools.jars"<br>above and the classpath below, without luck, as well as other<br>combinations of jars:<br><br> <path id="jsr94.jars" ><br> <fileset dir="${
drools.home}" ><br> <include name="drools-core*.jar"/><br> <include name="drools-compiler*.jar"/><br> <include name="drools-jsr94.jar"/><br> </fileset>
<br> <fileset dir="${drools.home}/lib" ><br> <include name="jsr94-1.1.jar"/><br> <include name="janino-2.5.7.jar"/><br> </fileset><br> </path>
<br><br>Latest error is this:<br><br> [java] Caused by: java.lang.RuntimeException: The Eclipse JDT Core jar is not in the classpath<br><br>I went out of my way to specify the janino jar so don't know<br>why an eclipse jar is required (I'm building from the command
<br>line and not using Eclipse.) <br><br>I'm sure it's my ignorance but wonder if someone could email me<br>ant script that will do the job?<br><br>Thanks, Garry<br><br><br><br></div><br><hr>Discover the new Windows Vista
<a href="http://search.msn.com/results.aspx?q=windows+vista&mkt=en-US&form=QBRE" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">Learn more!</a></div>
<br>_______________________________________________<br>rules-users mailing list<br><a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br><a onclick="return top.js.OpenExtLink(window,event,this)" href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">
https://lists.jboss.org/mailman/listinfo/rules-users</a><br><br></blockquote></div><br>