JBoss.orgCommunity Documentation

Chapter 2. Runtimes and Servers in the JBoss AS plugin

2.1. Runtimes
2.1.1. Installing a new runtime
2.1.2. Detecting an existing runtime
2.1.3. Duplicating a runtime configuration
2.2. Servers
2.2.1. Creating a New Server

In this chapter we will discuss how to install runtimes and servers.

First of all it is necessary to mention that the JBoss AS plugin makes use of WTP. This includes starting and stopping servers in run or debug mode. It also includes targeting WTP projects, such as Dynamic Web Projects, to certain server runtimes in order to ensure that the proper JARs from a specific server are added to the project's classpath properly.

In order to get started creating, running and debugging J2EE applications, we should create our runtime and server instances.

In JBoss Tools, the main purpose of Server Runtimes is to point to a server installation somewhere on disk. In our case, this will be a JBoss installation. It can then be used for two primary purposes:

You can install runtimes into Eclipse by selecting WindowPreferences menu and then selecting ServerRuntime Environments from the categories available on the left.

From this preference page you can see all declared runtimes along with their types. Here, it is possible to edit or remove existing runtimes, as well as add a new one.

To create a JBoss runtime click the Add button and choose the appropriate type of runtime from the JBoss Community category.


Now there is a separation between .org servers (the JBoss Community category) and product server that comes with JBoss EAP in JBDS ( the JBoss Enterprise Middleware category).

As you can see, JBoss Tools™ provide its own adapters such as JBoss 3.2, 4.0, 4.2 and 5.0 as well. The last one comes a new safer incremental deployment feature, which prevents partial deployments to be picked up by the server. It means that scanning for auto-deployment is suspended while files are being copied to the deployment location and resumed when the copy is completed.


We recommend you use a fully supported JBoss Enterprise 6.0 server adapter.

You will also note a Deploy-Only Runtime type. This type does not provide a classpath for WTP projects. It is used solely by it's server type for the purpose of setting up a deploy directory for users who do not wish to make use of starting, stopping, or debugging their projects inside Eclipse.

The following table describes all the available options of the current wizard page.

As a result of having each runtime represent a specific configuration rather than the server installation as a whole, it is very likely you will create several different runtimes to test each of your configurations. So it becomes important to ensure your runtimes and later your servers, are given descriptive names that help you to remember which is which.

Click the Finish button to see your new runtime in the list.


If you edit the configuration of a runtime, the changes don't affect the settings of the servers that currently use the runtime. To apply the changes to them also, you should double left click on the server, select OverviewRuntime Environment, make sure that necessary configuration is chosen, click the Finish button and then Save button.

JBoss Tools features the ability to search, detect and add existing JBoss server runtimes installed on your system. If you don't have an existing runtime you can download one through the Download option or Section 2.1.1, “Installing a new runtime” will guide you through the creation process. To begin searching for your existing JBoss runtime select WindowPreferencesJBoss ToolsJBoss Runtimes.

The JBoss Tools Runtimes preference page is split into two different sections. One section defines Paths to be searched for installed server runtimes, the other section defines the runtime detectors available when the paths in the previous section are checked.

The Add button in the Paths section opens a file system browser window. Select the directory you wish to have recursively searched for JBoss runtimes. The directory will be searched and all found servers will be displayed as a list in the Searching for runtimes dialog. From the returned list, choose the runtimes you wish to make available by clicking the box beside each runtime and clicking the OK button.


Server runtime detection now recognizes the ESB runtime distributed as part of the JBoss Service-Oriented Architecture Platform.

The path you searched is now added to a list in the JBoss Tools Runtime Detection dialog Paths section. All the paths in this section will be automatically searched when a new workspace is created. If you wish for a path to be searched on startup then check the checkbox in the Every start column associated with it.

If you don't have a runtime already downloaded, you can download a free community application server through the Download button.


No official support is available for community application servers (this includes enterprise customers using JBoss Developer Studio).

Clicking on the Download button will display a new screen of available runtimes that can be downloaded. Highlight the server you wish to download and install, and click the OK button.

A new dialog will appear asking you to specify an Install folder and Download folder; the option to Delete archive after installing is checked by default. Once you have specified the two paths above, click the OK button and the server will begin downloading.

Once the server has been downloaded and installed, you will notice that the path to the new server now appears in the Paths section of the JBoss Tools Runtime Detection dialog.

WTP servers are Eclipse-representations of a back end server installation. They are used to start or stop servers, deploy to servers, or debug code that will run on the server. They keep track of the modules (JARs, WARs, etc) you deploy to the server and also allow you to undeploy those modules (see Section 5.1.1, “Deploying with Run On Server Wizard”).

Servers can be started or stopped via the Servers view in your workbench. They are often backed by a runtime object representing that server's location.

There are many ways to get to the new server wizard. One way is to select FileNewOther...Server. This should show the wizard like below.

A server object keeps track of the command line arguments when starting or stopping and the runtimes keep track of the location of the installation. This means that each server instance must be backed by an appropriate runtime.

The New server wizard allows you to name the server via the Server name field, or you can use a generated default name.

You can select the appropriate runtime from the Server runtime environment combo box. If there is no runtime that matches your needs, press the Add... link nearby to bring up the wizard for creating a new runtime (see Figure 2.3, “Adding a JBoss 5.0 Runtime”). To configure an existing runtime, go to server preferences by pressing the Configure runtime environments... link.

If the server you want to create does not have any installed runtime yet, the combobox and the links are absent.

In this case the next page of the wizard which has the same form as in the previous section and will ask you to create the associated runtime.

After targeting your server to a runtime, the final screen in this wizard presents a summary of the selected options, giving you a chance to verify that you have selected the appropriate runtime.

Click the Finish button to complete the process of the server creation.

Now that we have created our runtimes and servers, we can explore the services and tools provided by the JBoss Server Manager.