uCosminexus Application Server, Application Development Guide

[Contents][Glossary][Index][Back][Next]

2.5 Eclipse settings

This section describes the procedure for checking the Eclipse JDK settings that are required for developing J2EE applications. This subsection also describes the setup procedure to output the local variable information of a J2EE application.

Organization of this section
(1) Checking JDK
(2) Output settings for local variable information

(1) Checking JDK

Check whether the JDK used during the development with Eclipse is also the same JDK as provided with Developer. To perform the check:

  1. From the Eclipse menu bar, select Window-Preferences.
    The Preferences dialog box is displayed.
  2. In the left pane, select Java-Installed JREs.
    The Installed JREs page is displayed.

    [Figure]

  3. Confirm that Developer-provided JDK is shown under Installed JREs.
    Confirm that the following path is displayed in Location:
    Developer-installation-directory/jdk
    • If the path is not displayed
      Click the Add button and specify the above path. After specifying the path, select the Name checkbox.
    • If the path is displayed
      Confirm that the Name checkbox is selected. If the checkbox is not selected, select the checkbox.
      Particularly, if multiple JDKs are installed, the path Developer-installation-directory/jdk might not be selected. If the checkbox is not selected, select the checkbox.
  4. Click the OK button.
    The settings are saved.

(2) Output settings for local variable information

Depending on the Eclipse compiler settings, local variable information of the J2EE application can be output in the stack trace when an exception occurs. For details on the output of the local variable information, see 5.10 Contents of JavaVM stack trace information in the uCosminexus Application Server Maintenance and Migration Guide.

To set up the compiler so that local variable information is output:

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

    [Figure]

  3. Specify the following items:
    Items Specified values
    JDK compliance Compiler compliance level Choose 1.6.
    Classfile Generation Select Add variable attributes to generated class files (used by the debugger).
    Note that other items can be selected according to the contents to be output.
    Specify the following items if necessary:
    Items Specified values
    JDK compliance Use default compliance settings Specify the settings you will use for the compiler.
    • If you select the checkbox
      Settings are applied according to the level specified in Compiler compliance level.
    • If you do not select the checkbox
      Specify the following items manually:
      Generated .class files compatibility
      Source compatibility
      Disallow identifiers called assert
      Disallow identifiers called enum
  4. Click the Apply button or OK button.
    The settings are saved.

To change the settings for each project, you can specify the same settings by selecting Project - Properties - Java Compiler in the Eclipse menu bar.