Tomcat Java Compiler difference

末鹿安然 提交于 2019-12-11 00:13:44

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!