我的环境是:
windows 7, 32 bit, two jdk, one is 1.5, another is 1.7, google gwt, jetty, ant, two eclipse, one is kepler, another is luna.
对于kepler,我设置它的jdk为1.5,并使用ant编译和jar,这个工作,并且eclipse可以在调试时打开gwt窗口。
然后我使用luna,从cvs检查出项目(gwt项目),有错误说jdk在用ant编译时是1.5,因此我将jdk更改为1.7,因为这个项目需要这个版本,最终编译好了蚂蚁。但是,当我在eclipse中调试它时,它会打开一个gwt窗口,表示无法编译为jsp,而控制台中的错误是:
10:20:48.193 [btpool0-8] ERROR org.apache.jasper.compiler.Compiler - Javac exception Compile failed; see the compiler error output for details. at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:933) at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:757) at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:382) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:472) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:451) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:439) ..... 10:20:48.194 [btpool0-8] ERROR org.apache.jasper.compiler.Compiler - Env: Compile: javaFileName=/C:/Users/FRANKH~1/AppData/Local/Temp/Jetty_localhost_8001_www__Login__-wcglsc/jsp//org/apache/jsp\login_jsp.java cannot access cn.com.yict.easyport.web.service.CommonUtil wrong class file: D:\cvs\eInvoice\common-web\target\classes\cn\com\yict\easyport\web\service\CommonUtil.class class file has wrong version 51.0, should be 49.0 please delete this file or make sure ... import cn.com.yict.easyport.web.service.CommonUtil;
发生了什么事?
提前致谢!
答案 0 :(得分:0)
修改此文件后:org.eclipse.jdt.launching.prefs:.metadata.plugins \ org.eclipse.core.runtime.settings,
此问题已得到修复。
修改是: 添加
<libraryLocations>\r\n<libraryLocation
jreJar\="D\:/Java/jdk7/jre/lib/resources.jar"
jreJavadoc\="http\://docs.oracle.com/javase/7/docs/api/"
jreSrc\="D\:/Java/jdk7/src.zip" pkgRoot\=""/>\r\n.........
到它。
日食是:Eclipse Java EE IDE for Web Developers.
Version: Luna Release (4.4.0)
Build id: 20140612-0600
我的问题是: