In this section, you will create a new Java project.
In this tutorial, we will use JUnit as our example project. JUnit is an open source unit testing framework for Java.
Refer to http://www.junit.org for more information.
1. |
In the main workbench window, select the drop-down menu from the Open New Wizard button and select Project. |
2. |
On the left, select Java, and on the right, select Java Project. Then click Next. In the Project name field, type "JUnit", then click Finish. Notice that a new Java perspective opens with the new Java project in the Packages view. Notice the new menu options and Java-specific buttons in the workbench toolbar that are loaded along with some of the views in the Java perspective. Depending on which view or editor is active, other buttons and menu options will be available or visible. ![]() |
3. |
In the Packages view, make sure that the JUnit project is selected, and from the menu bar, select File > Import. |
4. |
Select Zip file, then click Next. |
5. |
Click the
Browse
button next to the
Zip file
field and browse to select <workbenchRoot>/plugins/ |
6. |
Below the import hierarchy list in the Import wizard, click the Select All button. You can expand and select elements within the junit directory on the left side to see the individual resources that you are importing displayed on the right side. Note: Do not deselect any of the resources in the junit directory at this time. You will need all of these resources in the tutorial. ![]() |
7. |
Make sure that the JUnit project appears in the Where do you want the imported resources to go? field. Then click Finish. In the import progress indicator, notice that the imported resources are compiled as they are imported into the workbench. This is because the Perform build automatically on resource modification option is checked on the Workbench preferences page. |
8. |
In the Packages view, expand the JUnit project and notice the JUnit packages. ![]() |