0 Replies Latest reply on Jan 4, 2008 3:19 PM by Keith Bennett

    Drools IDE - Functions causing syntax error

    Keith Bennett Newbie

      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?