使用JDK 8后编译JSP时出错 [英] Error compiling JSP after using jdk 8

查看:205
本文介绍了使用JDK 8后编译JSP时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我得到的错误是:

org.apache.jasper.JasperException: JBWEB004062: Unable to compile class for JSP: 

JBWEB004061: An error occurred at line: 1 in the generated java file
The type java.util.Map$Entry cannot be resolved. It is indirectly referenced from    required .class files

我在Internet上阅读了很多文章,讨论了相同的问题,并且所有人都试图通过更改eclipse版本,关闭eclipse并重新启动它,或者在类路径中为JDK定义工作区默认版本来解决该问题.

I read a lot of posts on the Internet arguing this same problem, and all of them tried to solve it changing eclipse version, or shut-down eclipse and restarting it, or defining in the classpath the workspace default version for JDK.

我尝试了前两个选项,但是它们没有用,但是没有第三个,因为我必须使用jdk 8而不是7.

I tried the first two options and they didn't work, but not the third because I have to use jdk 8 and not 7.

直到我使用JDK 7为止,一切正常. 那么,如何正确地使用jdk 8进行编译?

Until I was using JDK 7 it all worked fine. So, what can I do in order to compile correctly with jdk 8?

推荐答案

[已解决] 看来我在使用旧版本的ecj(ecj3.7.2redhat-1.jar).使用最新版本(ecj-4.3.1.jar),它可以正常工作.

[SOLVED] It seems I was using an old version of ecj (ecj3.7.2redhat-1.jar). Using a newest version (ecj-4.3.1.jar) and it works fine.

这篇关于使用JDK 8后编译JSP时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆