What is the difference between javac and the Eclipse compiler?

后端 未结 4 1138
误落风尘
误落风尘 2020-11-22 03:10

Is Eclipse\'s Java compiler just a wrapper around the same core that the javac program is wrapped around, or is it a separate compiler altogether? If the latter

4条回答
  •  囚心锁ツ
    2020-11-22 03:46

    Everyone has already explained that they're different. Here are some difference in behaviors I've noticed between the two compilers. They all boil down to a bug in (at least) one of the implementations.

    Compile-time optimization related

    • Eclipse bug? Switching on a null with only default case

    Generics type inferrence related

    • Generics compiles and runs in Eclipse, but doesn’t compile in javac
    • Compilers behave differently with a null parameter of a generic method

提交回复
热议问题