Creating the Workspace

You need to create and configure an Eclipse workspace capable of interacting with the JBoss application server when you are running or debugging the application.
  1. Launch Eclipse.
  2. When prompted for a workspace, choose the path to the directory that you extracted the source files to.

    The empty workspace is opened, as you have not yet imported the projects into Eclipse.

  3. On the Window menu, choose Preferences, then choose Server > Runtime Environments.

    The Server Runtime Environments pane appears.

  4. Click Add.
  5. If you have previously downloaded the JBoss 7.1 server adapter on this machine, in the Select the type of runtime environment field, type JBoss 7.1, then select JBoss 7.1 Runtime from the list displayed; otherwise, you need to download and install it:
    1. Click Download additional server adapters, choose JBossAS Tools from the list displayed, then click Next.
    2. Click I accept..., then click Finish.
    3. Click OK to download and install.
    4. Click Yes to restart Eclipse, then repeat from step 2.
  6. Click Next.
  7. Ensure the Home Directory field points to the directory in which you have JBoss installed; if not, amend it.
  8. Set the JRE option to a Java run-time version compatible with the version that the projects will be deployed against.
    Tip: On the Window menu, choose Preferences > Java > Installed JREs and Execution Environments to view the most likely run-time versions, and a list of compatible run-time versions.

  9. Click Finish.

    The JBoss 7.1 run-time is installed for this workspace.

  10. Click OK.