Eclipse has implemented it's own compiler. It actually uses a couple compilers.
One compiler is a very quick compiler that brings you the red squiggles. It is fast, but can be inaccurate.
The other compiles your code when you want to run a project. It is different from the standard java compiler. 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.
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.