|
[Drools]
Drools 2.0-rc1 with IKVM
[
Mark Proctor
]
Now that Drools 2.0 has stabalised I decided to checkout IKVM to see if Drools would run on .net. I downloaded version 0.12.0.0 and unzipped adding the bin directory to my path. I then grabbed a distribution copy of drools-2.0-rc1 that comes with the needed dependencies http://dist.codehaus.org/drools/distributions/drools-2.0-rc1-bin-withdeps.zip and unzipped it.
I thought I would start with an easy one as FibonacciNative relies on nothing but drools-core:
ikvm -cp drools-all-2.0-rc1.jar org.drools.examples.fibonacci.FibonacciNative
Amazing it worked. Next lets see if it works with drools-java which depends on antl, xml-apis, xerxesImpl and janino:
ikvm -cp janino-2.3.2.jar;antlr-2.7.5.jar;xml-apis-1.0.b2.jar;xercesImpl-2.6.2.jar;drools-all-2.0-rc1.jar org.drools.examples.fibonacci.FibonacciExample fibonacci.java.drl
Crikey, success, I really didn't think an embedded compiler would work with IKVM - but it did. So now lets get a little bit more racey, drools-groovy using the latest groovy-jsr1:
ikvm -cp groovy-all-1.0-jsr-01.jar;xml-apis-1.0.b2.jar;xercesImpl-2.6.2.jar;drools-all-2.0-rc1.jar org.drools.examples.fibonacci.FibonacciExample fibonacci.groovy.drl
Smoking, and drools-python:
ikvm -cp jython-20020827-no-oro.jar;xml-apis-1.0.b2.jar;xercesImpl-2.6.2.jar;drools-all-2.0-rc1.jar org.drools.examples.fibonacci.FibonacciExample fibonacci.python.drl
Yup the entire set of drools modules works. I later tried the GUI examples Pet Store and Conway's Game of life, but they didn't work, which was to be expected as GNU Classpath's GUI stuff is still limited. excellent! --jpliska, May 17, 2005 09:12 PM
Well IKVM and Drools-out-of-the-box doesn't include a .NET semantic layer. I'm adding it in right now (should be done in a few days). Watch for it at http://binarybuzz.blogspot.com --Chinmay Nagarkar, October 5, 2005 05:26 AM
Mark, Were you able to compile the drools-all-2.0-rc1.jar into a .NET DLL? Ive tried and get UnsupportedClassVersionError which the drools page states is related to jdk1.5 features? Thanks, --kim Alexander, October 14, 2005 10:31 PM
All I tried is what you see above. Once I've got my current bulk of work out of the way I hope to look into prodocing .net assemblies as well as a c# language. Make sure you are trying this with the latest 2.1 jdk1.4 release. --Mark Proctor, October 14, 2005 10:57 PM
The "UnsupportedClassVersionError" can be worked around by setting the IKVM_EXPERIMENTAL_JDK_5_0 environment variable to a random value. --Christopher Soop, October 30, 2005 11:41 AM
Post a comment
|