Creating a new Java package

To create new Java packages in the Package Explorer:

  1. Optionally, select the project or source folder where you want the package to reside.

  2. Click the New Java Package button in the workbench toolbar. The New Java Package wizard opens.

  3. Edit the Source Folder field to indicate in which container you want the new package to reside. You can either type a path or click Browse to find the container. If a folder was selected when you chose to create the new package, that folder appears in the Source Folder field as the container for the new package.

  4. In the Name field, type a name for the new package.

  5. Click Finish when you are done.

Note: the default (unnamed) package always exists and does not need to be created.

Related concepts

Java projects

Related tasks

Creating Java elements
Moving folders, packages, and files
Organizing Java projects
Opening a package
Renaming a package

Related reference

New Java Package wizard
New Source Folder wizard
Java Toolbar actions

Legal notices