When you develop J2EE applications, the workbench requires that you specify the server runtime environments for your J2EE projects. The target server is specified during project creation and import, and it can be changed in the project properties. The target server setting is the default mechanism for setting the class path for J2EE projects.
In order to support different application servers that use different JDK levels for their Java™ Runtime Environment (JRE), the workbench requires that projects include a target server setting. For example, if you want to take advantage of the features of JDK 1.4.2, which is used as the runtime environment for WebSphere® Application Server V6.0, your applications require different class path entries than those that were used in previous versions of the workbench. By requiring that you specify a target server, the workbench enforces that proper entries are appropriately added for running on WebSphere Application Server V6.0 using the JDK 1.4 runtime environment.
When the project is created, the class path of the project is updated with two class path containers. One container is the JDK container and the other is the server container. The JDK container points to the directory that contains the JAR files that are necessary to support the JDK version. The server container points to the directory that contains the multiple public JAR files available in the selected server. The project then compiles based on the required JAR files located in these folders, and you do not need to worry about adding additional JAR files from the server during development. When the project is compiled, the JAR files are included in the class path. You can still add your own JAR files to the class path.
The target runtime environment is specified in the .runtime file in the project's resources. You should not edit this file manually.
All J2EE project creation and import wizards require you to specify the target server for the resulting projects. The list of target servers that you can choose from is filtered based on installed runtimes, the J2EE level of the application, and the J2EE module type. For example, for EJB projects only application servers that support Enterprise JavaBeans™ are displayed. All projects inside a single EAR file must be targeted to the same server. If you create a new project and add it to an existing EAR project during creation, the project inherits the target server setting of the EAR project.
To modify the target runtime and default server for an existing project: