2

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!

User420
  • 137
  • 3
  • 12
  • 1
    I don't know the complete answer, but there are some clues in answers to [this question](http://stackoverflow.com/questions/3061654/what-is-the-difference-between-javac-and-the-eclipse-compiler) (and in the linked documents). – Jozef Chocholacek Aug 02 '16 at 07:34
  • 2
    What kind of problems do you have with generics? – Tamas Rev Aug 02 '16 at 11:37
  • @TamasRev I had posted the problem here. http://stackoverflow.com/questions/38560851/jsp-compilation-error-on-generics – User420 Aug 03 '16 at 01:40
  • @JozefChocholacek I don't think the question you linked is relevant, since we don't see javac in this setting, just two variants of ecj, aka compiler-jdt. I, too, would be interested in learning how these two variants relate: How do versions correspond? Does the jasper thing contain any changes wrt original ecj? – Stephan Herrmann Aug 03 '16 at 18:19

1 Answers1

0

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.

User420
  • 137
  • 3
  • 12