uCosminexus Application Server, Application Development Guide
![[Contents]](FIGURE/CONTENT.GIF)
![[Glossary]](FIGURE/GLOSS.GIF)
![[Index]](FIGURE/INDEX.GIF)
![[Back]](FIGURE/FRONT.GIF)
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
Check whether the JDK used during the development with Eclipse is also the same JDK as provided with Developer. To perform the check:
- From the Eclipse menu bar, select Window-Preferences.
The Preferences dialog box is displayed.
- In the left pane, select Java-Installed JREs.
The Installed JREs page is displayed.
![[Figure]](FIGURE/ZU023100.GIF)
- 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.
- Click the OK button.
The settings are saved.
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:
- From the Eclipse menu bar, select Window-Preferences.
The Preferences dialog box is displayed.
- In the left pane, select Java - Compiler.
The Compiler page is displayed.
![[Figure]](FIGURE/ZU023200.GIF)
- 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
|
- 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.
All Rights Reserved. Copyright (C) 2012, 2013, Hitachi, Ltd.