[rules-users] How to set JANINO compiler with Drools5 M5
mproctor at codehaus.org
Thu Feb 26 10:06:16 EST 2009
Shigeaki Wakizaka wrote:
> I'm kind of new to Drools5.0.
> Could I ask you guys how to set JANINO compiler with recent API?
> I just run the sample drl with EclipseIDE, which is download from drools
> site, and then
> the error occured- The Eclipse JDT Core jar is not in the classpath.
> So, I just want to know why this happens and how to set another compiler
> to retry.
Just realised that wasn't documented in drools-api any more, so I just
updated it to the following, hopefully this answers your Q :)
* Two dialects are supported, Java and MVEL. Java is the default
* The Java dialect supports the following configurations:
* <li>drools.dialect.java.compiler = <ECLIPSE|JANINO></li>
* <li>drools.dialect.java.lngLevel = <1.5|1.6></li>
* And MVEL supports the following configurations:
* <li>drools.dialect.mvel.strict = <true|false></li>
* So for example if we wanted to create a new KnowledgeBuilder that used
Janino as the default compiler we would do the following:<br/>
* KnowledgeBuilderConfiguration config =
* config.setProperty("drools.dialect.java.compiler", "JANINO");
* KnowledgeBuilder kbuilder =
KnowledgeBuilderFactory.newKnowledgeBuilder( config );
* Remember the KnowledgeBuilderConfiguration could have taken a
Properties instance with that setting in it at constructor time,
* or it could also discover from a disk based properties file too.
> Thanks in advance.
> rules-users mailing list
> rules-users at lists.jboss.org
More information about the rules-users