The Java builder uses a compiler that implements the Java Language Specification.
Problems detected by the compiler are classified as either warnings or errors. The existence of a warning does not effect the execution of the program; the code executes as if it were written correctly. Errors are problems that cannot be ignored.
The Java compiler can create CLASS files, even in presence of compilation errors. However, in the case of serious errors (e.g., references to inconsistent binaries, most likely related to an invalid classpath setting), the Java builder does not produce any CLASS file.
Each project defines a build classpath that defines how its sources should be compiled.
Setting up the proper build class path is an important task when doing Java development. Without the correct build path, you will not be able to compile your code. In addition, you will not be able to search or look at the type hierarchies for Java elements.
The build class path consist of the following entries.
The source entry can be either the project itself or one or more of its source folders.
The build class path defines the list of projects required for building this project. Required projects are always built prior to building a project that depends upon them.
A Java project can optionally use an output folder for storing the generated class files. The default name of the output folder is "bin". When a project is using source folders it has to use an output folder. Non-Java resources contained in source folders like PROPERTIES files or GIF files are copied into the output folder by the Java builder. This ensures that they can be found at run time. If you have non-Java resources (e.g., documentation) that should not be copied into the output folder, you can create an ordinary folder and store these resources there.
You can attach source to a JAR file to enable source-level stepping and browsing of classes contained in a binary JAR file.
Source can be attached either on the Properties page of a JAR file (via the file's context menu) or when defining any project's build path (Properties > Java Build Path > Libraries tab).
In addition, the debugger will prompt you for a source attachment when it steps into code with no associated source.
Note: When attaching source to a JAR file that is referenced more then once inside a workbench, the JDT propagates the attachment to all the referenced JAR files.
A source attachment for a variable entry must be done only with variables. Both the path to the archive and the root path need to be defined by variables.