Unsupported major.minor version 51.0 error after moving from IntelliJ IDEA JBoss to MyEclipse Tomcat

后端 未结 2 1122
时光说笑
时光说笑 2021-01-14 09:38

I am getting a Unsupported major.minor version 51.0 error after moving from IntelliJ IDEA JBoss to MyEclipse Tomcat.

Everything was working great under IntelliJ IDEA

相关标签:
2条回答
  • 2021-01-14 10:01

    It seems that the version of JRE under tomcat is newer than the one used to compile the code.

    To fix the actual problem you should try to either update your JRE pointing in Tomcat with newer version Java JRE or specify target parameter to the Java compiler to instruct the compiler to create code compatible with earlier Java versions in Eclipse.

    0 讨论(0)
  • 2021-01-14 10:08

    This happens when you compile the code in a higher version of the JDK than you are using at runtime.

    You can set the compiler version here:

    Project -> Properties -> Java Compiler
    
    0 讨论(0)
提交回复
热议问题