[jboss-user] [Beginners Corner] - Drools IDE - Functions causing syntax error

kakbennett do-not-reply at jboss.com
Fri Jan 4 15:19:09 EST 2008


I have a simple rule file as follows:

#created on: Jan 4, 2008
package test

#list any import classes here.
import java.util.Collection;

#declare any global variables here
function void yourFunction(Collection arg) {
	/* code goes here*/
}
rule "Your First Rule"
	
	when
		#conditions
	then 
		#actions
		
end

rule "Your Second Rule"
	#include attributes such as "salience" here...
	when
		#conditions
	then 
		#actions
		
end

When I remove the function, the syntax error "static imports are only available if source level is 5.0" goes away.  I am using Eclipse 3.2.2, Drools IDE 4.0.2, and JRE 1.4.  I haven't had any problem until now.  Anyone seen this problem?  Can functions only be used with Java 5.0?

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4117195#4117195

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4117195



More information about the jboss-user mailing list