简体   繁体   中英

GWT servlet failure with JRE6

A GWT project built with Eclipse Juno and JDK 1.7 works correctly. However, I have to deploy it to a Tomcat6 server that uses JRE6. Building it with JDK 1.6 results in a runtime servlet error:

[WARN] failed HttpServlet java.lang.UnsupportedClassVersionError: UriServlet : Unsupported major.minor version 51.0

The Eclipse build path libraries are: commons-lang3-3.1.jar GWT SDK [GWT - 2.5.1] JRE System Library [jdk1.6.0_27]

Is there a feature in JDK 1.7 that the servlet needs? Do I have to use an Eclipse version earlier than juno? There has to be a way to build a project than can be deployed to a Tomcat6/JRE6 server.

In eclipse, Right now java compiler level may be 1.5 .

You have to change it 1.6 and compile it again.

Right click project->Properties->Java Compiler->Enable project specific settings

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM