Why isn't Drools working with Java 8?

后端 未结 5 414
悲&欢浪女
悲&欢浪女 2020-12-17 10:02

I just installed the final version of Java 8. When I try to build my project with Maven, many tests fail if I use Java 8, but pass fine with Java 7. I\'ve tried running it

5条回答
  •  暖寄归人
    2020-12-17 11:04

    ECJ, which is used to compile java code in your rules, only began supporting Java 8 syntax recently with Luna (4.4) so an update is required.

    If you are wanting to use Java 8 syntax in your rules you will also want to use Drools 6.4.0.Final as they now recognizing Java 8 as Java 8 (they were mapping 8 over to 7 to fix issues with ECJ 4.3)

    MVEL 2.2.X version or later, which is a shorthand alternative to Java syntax, also supports Java 8.

提交回复
热议问题