What is the difference between javac and the Eclipse compiler?

Answer

Eclipse has implemented its own compiler called as Eclipse Compiler for Java (ECJ).

It is different from the javac, the compiler that is shipped with Sun JDK. One notable difference is that the Eclipse compiler lets you run code that didn't actually properly compile. If the block of code with the error is never ran, your program will run fine. Otherwise, it will throw an exception indicating that you tried to run code that doesn't compile.

Another difference is that the Eclipse compiler allows for incremental builds from within the Eclipse IDE, that is, all code is compiled as soon as you finish typing.

The fact that Eclipse comes with its own compiler is also apparent because you can write, compile, and run Java code in Eclipse without even installing the Java SDK.

A few examples where ECJ is preferred over javac is:

Apache Tomcat uses ECJ to compile JSPs,
IntelliJ IDEA has support for ECJ, as of GNU Compiler for Java (GCJ) 4.3,
GCJ integrates with ECJ,
Liferay builds with ECJ.

All eclipse Questions

Ask your interview questions on eclipse

Write Your comment or Questions if you want the answers on eclipse from eclipse Experts
Name* :
Email Id* :
Mob no* :
Question
Or
Comment* :
 





Disclimer: PCDS.CO.IN not responsible for any content, information, data or any feature of website. If you are using this website then its your own responsibility to understand the content of the website

--------- Tutorials ---