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 > Server. Change the value for Target runtime to
select a different target server 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 Deploy. If you attempt
to run an application on a server target that is different from its generated
deployment code, the application fails to run.