3.4.1 Setting up Eclipse

This subsection shows the procedure for checking the JDK version set in Eclipse. This subsection also shows the procedure for specifying the settings for outputting information about the local variables that are in the J2EE application.

Organization of this subsection
(1) Checking the version of JDK
(2) Specifying the settings for outputting the information about local variables

(1) Checking the version of JDK

Check whether the JDK version to be used for development in the Eclipse environment is a JDK version provided by Service Architect. The following shows the check procedure:

  1. From the Eclipse menu, select Window, and then Preferences.
    The Preferences dialog box appears.
  2. In the left pane, select Java, and then Installed JREs.
    The Installed JREs page is displayed in the right pane.

    [Figure]

  3. Check whether a JDK version provided by Service Architect is displayed in the Installed JREs list.
    Check whether the following path is displayed in the Location column:

    service-platform-installation-directory\jdk

    If the path is not displayed:
    Click the Add button. The JRE Type page appears.
    [Figure]
    Select Standard VM, and then click the Next button. The JRE Definition page appears.
    [Figure]
    Enter service-platform-installation-directory\jdk in JRE home, enter jdk in JRE name, and then click the Finish button. After you add the entry, select the check box in the Name column.
    If the path is displayed:
    Check whether the check box in the Name column for the appropriate version is selected. If that check box is not selected, select it.
    Note that if two or more JDK versions have been installed, the check box for the appropriate version (service-platform-installation-directory\jdk) might not be selected. If that check box is not selected, select it.
  4. Click the OK button.
    The settings are saved.

(2) Specifying the settings for outputting the information about local variables

You can specify the Eclipse compiler settings so that the information about local variables in the J2EE application is output as a stack trace when an exception occurs.

The following shows the procedure for specifying the compiler settings to output the information about local variables as a stack trace:

  1. From the Eclipse menu, select Window, and then Preferences.
    The Preferences dialog box appears.
  2. In the left pane, select Java, and then Compiler.
    The Compiler page is displayed.

    [Figure]

  3. Specify the following settings:
    Item nameValue to be specified
    JDK ComplianceCompiler compliance levelSelect 1.7.
    Classfile GenerationSelect Add variable attributes to generated class files (used by the debugger).
    For other items, select the necessary options according to the information that you want to output.
    Optionally, specify the following settings:
    Item nameValue to be specified
    JDK ComplianceUse default compliance settingsSpecify the settings that you want to use for the compiler.
    • If this item is selected:
      The settings that are appropriate for the level specified by Compiler compliance level are applied.
    • If this item is not selected:
      Manually specify the following options:
      Generated .class file compatibility
      Source compatibility
      Disallow identifiers called 'assert'
      Disallow identifiers called 'enum'
  4. Click the Apply or OK button.
    The settings are saved.