Optional Notes — Setting the Environment

  1. Setting code comments
  2. Checking compiler compliance level
  3. Selecting Java Runtime Environment

Required Code Comments

This course requires a formatted comment at the beginning of every Java class submitted. The format for this comment can be found on the course coding standards page. In Eclipse, templates for comments and coding styles can be set. With a template set, Eclipse will automatically create an empty opening comment for us.

Code Templates

We will define a template for the opening comment.

Checking compiler compliance level

Select JDK Compiler compliance level as 1.6 so that it follows J2SE 1.6 standards for compiling Java programs for the project. To set the compiler compliance level, go to “Window → Preferences → Java → Compiler”. In the JDK Compliance section, select the compiler compliance level to 1.6.

Compiler Settings

Selecting Java Runtime Environment

While selecting compiler compliance, make sure you have a compatible JRE (Java Runtime Environment) installed and activated. To do so, go to “Window → Preferences → Java → Installed JRE” and select the checkbox against the appropriate JRE. For those using their laptops, they should add the installed JRE and then select it.

Installed JRE