Wednesday, 6 August 2008

How does Eclipse build Java code?

Eclipse has its own Java compiler (the Eclipse Compiler for Java) that implements the Java Language Specification.

Compliance level can be checked using Alt-WP and clicking Java->Compiler.

Compiler->Errors and Warnings allows you to fine-tune what the compiler regards as error versus a warning. e.g. in my setup: non-static access to a static member is a warning, undocumented empty block is ignored.

The compiler is part of the JDT (Java development tools) extension to the workbench. It is not possible to use another Java compiler other than the built-in one (which includes support for special features like automatic incremental compilation and code snippet evaluation).

A programmers guide to JDT tooling can be found here.

No comments:

Blog Archive