This section describes the procedure for using JDK 6 in development on a Java EE 6 workbench.
Starting a Java EE 6 workbench that uses JDK 6
To start the Java EE 6 workbench using JDK 6, follow the procedures below:
Open the Command Prompt, and move to the installation folder of the Java EE 6 development function.
[installation folder of the Java EE 6 development function]
<product installation folder>\IDE\1101_WB36\eclipse
Execute isstudio.exe with the -vm option added, as shown below:
> isstudio.exe -vm <JDK 6 installation folder>\jre\bin
In the [Select a workspace] window, select a new workspace folder.
If an existing workspace is selected, follow the procedures in "Modifying existing workspace settings" below:
Modifying existing workspace settings
If an existing workspace is selected when the Java EE 6 workbench is started, follow the procedures below to modify settings to use JDK 6:
Add JDK 6 to [Installed JREs].
From the workbench menu, select [Window] > [Preferences].
In the [Preferences] dialog box on the left pane, select [Java] > [Installed JREs].
In the right [Installed JREs] window, click [Add].
In the [JRE Type] window, select "Standard VM", then click [Next].
In [JRE home] of the [JRE Definition] window, specify the JDK 6 installation folder.
"JDK 6" is displayed in [JRE name], and a list of JAR files for the JDK 6 library specified in [JRE system libraries] is displayed. Click [Finish] to close the window.
"JDK6" is added to the list in [Installed JREs].
Select the "JDK 6" checkbox to make JDK 6 the default JDK. Click [OK] to close the dialog box.
Modify JDK used by an existing project to JDK 6.
From Project Explorer, select the project to be modified, and from the popup menu select [Properties].
In the left pane of the [Properties] dialog box, select [Java Build Path].
The [Java Build Path] page is displayed on the right. Select the [Libraries] tab.
From the list, select "JRE System Library[JavaSE-1.7]", then click [Edit].
In the [JRE System Library] window change the "Execution environment" to "JavaSE-1.6(JDK6)" and click [Finish].
Click [OK] to close the [Properties] dialog box.
Initializing a Java EE 6 runtime environment that uses JDK 6
The Java EE 6 runtime environment must be initialized for use with JDK 6 so the applications developed using JDK 6 can be deployed in the Java EE 6 runtime environment and tested. Any Interstage Java EE 6 DAS services created, or deployed applications, are deleted after initialization. If necessary, recreate Interstage Java EE 6 DAS services and redeploy applications after initialization.
Follow the steps below to initialize:
No. | Steps | References |
---|---|---|
1 | Backup Application Server resources. Note: Perform the tasks as required if J2EE and Java EE 5 functions are used with the Interstage Application Server bundled with this product. | "Interstage Application Server Operator's Guide" > "Resource Backup/Export" |
2 | Uninstall the Application Server. | "Interstage Studio Installation Guide" > "Installation" > "Overwrite installation" |
3 | After backing up any necessary files in the APS folder, delete the APS folder. | - |
4 | Install the Application Server. Select JDK 6 in the [Select the JDK to be used in the Java EE 6] window. | "Interstage Studio Installation Guide" > "Installation" > "Overwrite installation" |
5 | Restore the resources that were backed up. Note: Perform the tasks as required if J2EE and Java EE 5 functions are used with the Interstage Application Server bundled with this product. | "Interstage Application Server Operator's Guide" > "Resource Restore/Import" |
Point
If developing using JDK 7 after developing using JDK 6, follow the procedure below to revert the settings:
The Java EE 6 workbench is usually started on the application page (in Windows 8 and Windows Server 2012) or from the start menu (in other Windows systems).
If the settings of an existing workspace have been modified for JDK 6 use, revert the settings to those for JDK 7.
In the [Installed JREs] list, select the "JDK 6" checkbox to make JDK 7 the default JDK.
In the existing project, in the [JRE System Library] window, modify "Alternate JRE" to "JDK7".
In the [Java Compiler] window for the existing project, change the [Compiler compliance level] to [1.7].
Initialize the Java EE 6 runtime environment for use with JDK 7. The procedure is the same as described in "Initialization". When installing the Application Server, select JDK7 in the [Select the JDK to be used in the Java EE 6] window.