3.4.1 Setting up Eclipse
(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:
- From the Eclipse menu, select Window, and then Preferences.
The Preferences dialog box appears.
- In the left pane, select Java, and then Installed JREs.
The Installed JREs page is displayed in the right pane.
![[Figure]](figure/zu023100.gif)
- 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]](figure/zu023110.gif)
- Select Standard VM, and then click the Next button. The JRE Definition page appears.
![[Figure]](figure/zu023120.gif)
- 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.
- 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:
- From the Eclipse menu, select Window, and then Preferences.
The Preferences dialog box appears.
- In the left pane, select Java, and then Compiler.
The Compiler page is displayed.
![[Figure]](figure/zu023200.gif)
- Specify the following settings:
Item name | Value to be specified |
---|
JDK Compliance | Compiler compliance level | Select 1.7. |
Classfile Generation | Select 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 name | Value to be specified |
---|
JDK Compliance | Use default compliance settings | Specify 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'
|
- Click the Apply or OK button.
The settings are saved.