Preparing the workbench

In this section, you will verify that the workbench is properly set up for Java development.

The following is assumed:

If you're not familiar with the basic workbench mechanisms, please see the Getting Started chapter of the Workbench User Guide.

Verifying JRE installation and classpath variables

  1. Select the menu item Window > Preferences to open the workbench preferences. 
  2. Select Java > Installed JREs in the tree pane on the left to display the Installed Java Runtime Environments preference page. Confirm that a JRE has been detected. By default, the JRE used to run the workbench will be used to build and run Java programs. It should appear with a check mark in the list of installed JREs. We recommend that you use a Java SDK instead of a JRE. An SDK is designed for development and contains the source code for the Java library hence easing debugging. Additional SDKs can be added by searching the harddrive for installed SDKs. To do so simply click the Search button and specify a root folder for the search.

    Installed JREs preference page

  3. Select Workbench in the tree pane to display the Workbench preference page. Confirm that the Perform build automatically on resource modification option is checked.

    Workbench preference page

  4. Select Java > New Project in the tree pane to display the New Project preference page. Confirm that Source and output folder is set to Project.

    New project preference page

  5. Select Java > Editor in the tree pane to display the Java Editor preference page. On the preference page, press the Annotations tab. Confirm that all options are checked.

    Java Editor preference page

  6. Click on OK to save the preferences.

Installing the JDT example plug-ins

The JDT example plug-ins contribute a New Wizard that automatically creates a sample project in your workbench. In this tutorial, you will manually create a new project in order to review the steps involved.  But first you need to download and install the examples (if you have not done so already).

  1. Go to the http://www.eclipse.org/downloads/ page and locate the release that you are working with.
  2. Scroll down to the Example Plug-ins section and follow the install instructions.
  3. If the workbench is running, shut it down. Plug-ins should not be installed while the workbench is running.
  4. Extract the contents of the Zip file to the root directory of your workbench installation (e.g. c:\eclipse).
  5. Start the workbench.

Related concepts

Java projects
Classpath variables
Build classpath

Related tasks

Working with build paths
Working with JREs

Related reference

JRE Installations Preferences
New Project Preferences
Java Editor Preferences

Copyright (c) 2000, 2003 IBM Corporation and others. All Rights Reserved.