Using the Preferences page, you can direct the workbench
to use a specific runtime environment of an application server for compiling,
testing, or running your application.
About this task
A
server runtime environment is composed of
the following definitions:
- a name to identify the server runtime environment
- the type of server that specifies the vendor and version-level of the
server
- the directory path to a local installation of the server
- in some cases, also includes a reference to a Java runtime environment
If a server runtime environment is referencing a stub directory of the
server, you can only compile your application against the stub server. However,
if referencing a full installation of the server, you can compile, test, and
run your application against the installation of the server.
To define
a server runtime environment, complete the following steps:
What to do next
To change the list of available target
servers, click Window > Preferences > Server > Runtime Environments to
go to the 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 Runtimes tab.
- Under the Runtimes table, select the target servers for the module.
Important: If you change the target server for an
EJB project at 2.1 specification-level or earlier, regenerate the
deployment code by 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.