问题
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!
回答1:
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.
来源:https://stackoverflow.com/questions/38713904/tomcat-java-compiler-difference