Tomcat Java编译器差异 [英] Tomcat Java Compiler difference
问题描述
我有两台tomcat 5.5服务器.一是发展,一是生产.两者都在Java 1.6上运行.但是最近我遇到了一个问题,即泛型无法在生产环境中运行,但在开发中可以顺利运行.这两个系统之间的区别在tomcat 5.5/common/lib/
中.我的开发环境包含ecj-3.7.2.jar
,但是生产环境中没有此文件,而是包含jasper-compiler-jdt.jar
.
当我用ecj-3.7.2.jar
替换jasper-compiler-jdt.jar
时,泛型工作正常.据我了解,这些是Eclipse的JDT编译器库,我能知道这个问题的区别和原因.非常感谢!
jasper-compiler-jdt.jar
和ecj-3.7.2.jar
之间的区别是ecj是64位Java 1.6.41的编译器,而后者是32位Java 1.6.19的编译器.即使两个编译器均来自Java 1.6,jasper-compiler-jdt.jar也不支持ecj.jar这样的泛型.I have two tomcat 5.5 servers. One is for development and one is Production. Both runs on Java 1.6. But recently I had a problem where generics are unable to run on the Production environment but runs smoothly on development. The difference between these two system are in tomcat 5.5/common/lib/
. My development envr contains ecj-3.7.2.jar
but the production doesn't have this file instead it contains jasper-compiler-jdt.jar
.
When I replace jasper-compiler-jdt.jar
with ecj-3.7.2.jar
, the generics works fine. From my understanding, these are the Eclipse's JDT Compiler libraries, can i know what is the difference and the cause of this problem. Thanks a lot!
The difference between jasper-compiler-jdt.jar
and ecj-3.7.2.jar
is ecj is the compiler for 64bit Java 1.6.41 and the latter is for 32bit Java 1.6.19. Even though both compiler is from Java 1.6, jasper-compiler-jdt.jar couldn't support generics like ecj.jar do.
这篇关于Tomcat Java编译器差异的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!