Creating a New Java Package

You can create new Java packages using any one of several different approaches.

1.

From the Packages view, do one of the following:

  • Select the project or source folder where you want the new package to reside. Then click the Create a Java Package button in the workbench toolbar.
  • Select the project or source folder where you want the new package to reside. Then, from its context menu, select New > Package.
  • Select the project or source folder where you want the new package to reside. Then, from the drop-down menu on the Open The New Wizard button in the workbench toolbar, select Java Package.
  • Click the Open The New Wizard button; then in the left pane, select Java, and in the right pane, select Java Package.
  • Select the project or source folder where you want the new package to reside. Then, select File > New > Java Package from the menu bar.
  • Click the Create a Java Package button in the workbench toolbar.

2.

If a folder was selected when you chose to create the new class, that folder appears in the Folder field as the container for the new package.

Edit the Folder field as needed to indicate in which container you want the new package to reside. You can either type a path or click the Browse button to find the container.

3.

In the Package field, type a name for the new package.

4.

Click Finish when you are done.