Running a new drools project in Eclipse 3.2

hi!  

Has anybody worked on eclipse IDE on drools rule engine?  I add the plugin in 3.2 and created a new drools project.  It comes with a drl file  "Rule.java.drl"  and a test file (with a main class in it) "DroolsTest.java".  The project should run as it is acorrding to docs but is giving an error

"could not find main class, program will exit"

Somehow cannot find the main class?  Any clue why? I think I have all the classpath set.

subircAsked:
Who is Participating?
 
Mayank SConnect With a Mentor Associate Director - Product EngineeringCommented:
Oh then its a version error. That class was developed for a different version of Java and your default version in the Eclipse project is something else. Try changing the JRE in Eclipse (for this project) to point to another version.
0
 
subircAuthor Commented:
Any help appreciated --- thanks!!! I must be missing something in eclipse configuration

0
 
Mayank SAssociate Director - Product EngineeringCommented:
How exactly are you running? Did you right-click on DroolsTest.java and select Run As -> Java Application, or select from the Run menu -> Run As -> Java Application.
0
Cloud Class® Course: CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

 
subircAuthor Commented:
Tried both -  didn't work either way
0
 
subircAuthor Commented:
This is the error I am getting.....

java.lang.UnsupportedClassVersionError: org/drools/RuleBase (Unsupported major.minor version 49.0)
      at java.lang.ClassLoader.defineClass0(Native Method)
      at java.lang.ClassLoader.defineClass(Unknown Source)
      at java.security.SecureClassLoader.defineClass(Unknown Source)
      at java.net.URLClassLoader.defineClass(Unknown Source)
      at java.net.URLClassLoader.access$100(Unknown Source)
      at java.net.URLClassLoader$1.run(Unknown Source)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.net.URLClassLoader.findClass(Unknown Source)
      at java.lang.ClassLoader.loadClass(Unknown Source)
      at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
      at java.lang.ClassLoader.loadClass(Unknown Source)
      at java.lang.ClassLoader.loadClassInternal(Unknown Source)
Exception in thread "main"
0
 
subircAuthor Commented:
do you mean jdk1.5?  I have 1.4.2 and I also tried with the IMB_jre that comes when you install Websphere........
0
 
Mayank SAssociate Director - Product EngineeringCommented:
Well I'm not sure which version drools needs. Maybe it needs Java 5 - you can try installing the runtime for that from Sun's site http://java.sun.com/j2se/ and configure it with Eclipse (you can have multiple JREs installed on a machine but the one that matters for Eclipse is the one the project is configured with).
0
 
Mayank SAssociate Director - Product EngineeringCommented:
Which version did you try?
0
 
subircAuthor Commented:
jre 1.5.0_04  from sun  
0
 
Mayank SAssociate Director - Product EngineeringCommented:
Any reason for the B grade?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.