Search code examples
javaeclipsewildflyjboss-tools

Eclipse Error for WildFly: org/xnio/Cancellable : Unsupported major.minor version 51.0


I installed WildFly 8.2.1 in D:\SOURCE\ProgramsInstalled\wildfly-8.2.1.Final directory. I test ran it outside of Eclipse and it is working perfect.

I installed Eclipse Luna in D:\SOURCE\ProgramsInstalled\eclipse-jee-luna-SR2-win32-x86_64 directory.

Inside Eclipse Luna, I set JDK 1.7 as the default JRE:

enter image description here

Inside Eclipse Luna, I installed JBoss Tools 4.2.3.Final plugin via Eclipse Marketplace.

Inside Eclipse Luna, I installed WildFly 8.x runtime environment pointing to the WildFly in D:\SOURCE\ProgramsInstalled\eclipse-jee-luna-SR2-win32-x86_64 directory. And created the WildFly 8.x server using this runtime.

Inside Eclipse Luna, I ran WildFly. The "Console" view of Eclipse is showing me that WildFly ran successfully but Eclipse give me this error message:

enter image description here

Why I am getting this error? And how to resolve it?

When I try to stop WildFly in Eclipse I get this error message:

enter image description here

And Eclipse would not let me stop the WildFly. Not good. I am stuck.

Thanks


Solution

  • This is an error you get when you've compiled your code with Java 7, yet try to run it on a JRE of an older version (Java 6, for instance).

    You can solve this in two ways:

    1. re-compile the code in the version you want to run it in
    2. update the jre you'll run the code in to (at least) the version you compiled your code with