Using the Preferences page, you can direct the workbench
to use a specific runtime environment of an application server for compiling
your application. You can complete this by defining the installation directory
of the server:
To change the list of available target
servers, click Window > Preferences > Server > Installed Runtimes to
go to the Installed Server Runtime Environments section of the Preferences
dialog. Use the Add, Edit, Remove or Search options
to change the list of target servers as needed.
To change
the target server for a module:
- Right-click on the module in the Project Explorer view and click Properties
> Project Facets. The Project Facets page opens.
- Select the Add/Remove Project Facets button. The
Add/Remove Project Facets dialog box opens.
- Select the Show Runtimes button.
- Under the Runtimes table, select the target servers for the module.
Important: If you change the target server for an EJB project, regenerate
the deployment code. Right-click the EJB project, and select Prepare for
Deployment. If you attempt to run an application on a server target that
is different from its generated deployment code, the application fails to
run.