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.
Procedure
-
From the Window menu, select Preferences.
-
In the Preferences window, expand
the Server folder and then select Runtime
Environments.
The Server Runtime Environments
section of the Preferences dialog is displayed.
- Optional:
Click Search to
search your local directory for server runtime environments. Searching
on a remote host is not supported.
-
The Search for Runtime Environments dialog box opens.
In the Folder field, browse or type the directory
where you would like the workbench to start searching for server runtime
environments. Click OK.
-
If a list of installations is displayed, select the
target server and click OK. If no installations
of any application servers are found, continue completing the steps
for this task.
-
Click Add.
The New Server
Runtime Environments wizard opens.
-
Under the Select the type of runtime environment list,
select a server and version level as the target server runtime environment.
Tip: In the
Select the type of runtime
environment label, you can replace the text
type
filter text with keywords to filter the list of available
application servers. The following examples are filter keywords:
- Apache
- Filters the list of available servers where the vendor is Apache.
- WebSphere
- Filters the list of available servers where the name is WebSphere®.
- ejb
- Filters the list of available servers that support ejb modules.
- web
- Filters the list of available servers that support web modules.
- 5.0
- Filters the list of available servers that are at version, 5.0
or supports Java™ Platform, Enterprise
Edition 5 specification level.
- 1.2
- Filters the list of available servers that supports Java EE 1.2 specification level or any servers
that might have a version-level of 1.2.
-
When you add a server runtime environment, by default
a server is created and added as an entry in the Servers view. If
you want to add the server runtime environment and not create the
server in the Servers view, clear the Create a new local
server check box.
-
Click Next. A panel for the server
is displayed.
-
For Installation directory or Location field,
type or browse to the location of the target server.
Tip: If you specify a false location for the target server,
use the workbench to assemble modules and then use the application
server to deploy the modules.
If you selected the
target server as J2EE Runtime Library (a generic Java EE container), specify a directory that
contains .jar files such a \bin\lib directory
for a Java developer kit (JDK)
installation.
-
Click Finish.
The target
server name and type variables are added
to the table in the Server Runtime Environment section.
-
In the Preferences dialog, click OK.
What to do next
Important: When you use Rational Application Developer, if you change the target server
for an EJB project at 2.1 specification-level or earlier, regenerate the deployment code by
right-clicking the EJB project, and selecting . If you attempt to run an application on a server target that is different from its
generated deployment code, the application fails to run.
When you deploy Java EE applications in WebSphere
Developer Tools, you do not need to select Prepare for deployment before you
deploy or run any Java EE applications on WebSphere Application Server traditional or Liberty.