Drools Java 7 support in Eclipse

I created a Drools project in Eclipse (Indigo) configured to use JRE 1.7. But I get an error pointing to my .drl file:

com/sample/DroolsTest$Message : Unsupported major.minor version 51.0

The com.sample.DroolsTest.Message class is imported by the .drl file. The Drools runtime was 5.2.1 (also tried with 5.3.0.Final).

Any help would be appreciated. Thanks.


This exception doesn't seem to have to do anything with Drools in particular, but is a generic Java error. It occurs if you try to execute a Java class with a JRE that is older than the JDK that was used to compile it. For example, if you compiled the class with a JDK7 and then tried to execute it with a JDK6, you would get this error.


Just to detail above answer and comment. I had both JRE6 and JRE7 installed, with JRE7 being the default. I had to do two things to remove the error from the drools sample project.

<ol> <li>Set the JRE for the project to 1.6 Project properties->Java Build Path->Libraries. Remove JRE System Library 1.7 and Add Library->JRE System Library->Alternate JRE->JRE6</li> <li>Set the compiler compliance level for the project at 1.6. Project properties->Java Compiler->check Enable Project specific settings and set Compiler compliance level at 1.6.</li> </ol>


  • java.lang.UnsupportedClassVersionError: com/mysite/folders/Folders : Unsupported major.minor version
  • Nullpointer Exception during initialize / FXML injection not working as expected
  • Extracting Sensors Output into Sorted Array
  • Java Compilation error on Mac
  • Powershell Transcript is empty when running script from SQL Agent Job in 2005 SQL Server
  • Sorting elements of vector where each element is a pair [duplicate]
  • Can I apply the Git-Flow workflow on GitHub
  • if(!isset($_POST[“user”]) ignored and returns Undefined Index
  • Imports in __init__.py and `import as` statement
  • python - calculate orthographic similarity between words of a list
  • CS1703: In Xamarin.Droid, should I use the .Net Standard windowsruntime.dll located in Mono.Framewor
  • How to create virtual printer with iOS Simulator?
  • removing last 3 characters on a file (file extension)
  • runtime error when linking ffmpeg libraries in qt creator
  • Laravel at least one field is required
  • Is it possible to define rest argument in OCaml?
  • Ruby on Rails App deployed to heroku showing “We're sorry, but something went wrong”
  • Detecting null parameter in preprocessor macro
  • configure: error: no acceptable C compiler found in $PATH
  • C# program and C++ DLL compiled for 32-bit system crash on 64-bit system
  • Security issues with PHP's Readfile method
  • presentShareDialogWithParams posts to FB wall, but callback handler results say error
  • onBackPressed() not being executed
  • java inputstream
  • Breeze - Deleted Items nav properties bug
  • how to adjust image in a panel in Java swing?
  • Possible to stop flickering java tooltip in heavyweight mode?
  • Deserializing XML into class C#
  • Delete MySQLi record without showing the id in the URL
  • Numpy divide by zero. Why?
  • How to include full .NET prerequisite for Wix Burn installer
  • JTable with a ScrollPane misbehaving
  • Java static initializers and reflection
  • unknown Exception android
  • Programmatically clearing map cache
  • costura.fody for a dll that references another dll
  • Observable and ngFor in Angular 2
  • Unable to use reactive element in my shiny app
  • Converting MP3 duration time
  • jQuery Masonry / Isotope and fluid images: Momentary overlap on window resize