# Creating a Java Package Project

A Java package is a group of classes declared with the same package name. You can create a Java package project in any portfolio for which you have write permission.

To create a Java package:

1. Click the Project's button on the Java WorkShop main toolbar.
2. Double-click on the portfolio name where you want the Java package project to be placed.
3. Choose File -> New ->Project.
4. Type the name of your project in the box where the `untitled` name appears.
   Make sure you are consistent in the use of capitalization in project and file names (even if you are working on Microsoft Windows NT or Windows 95, where file names are not case-sensitive). Java WorkShop is case-sensitive.
5. Click the Package radio button.
6. Click Next.
7. Type your package name, using the `sun.jws.browse` format, in the Package name box.
8. Type the root directory of the class hierarchy in the Root directory box.
   For example, typing `mydir` causes the `.class` files in the Java source file to be saved in the directory `mydir`. This field is equivalent to using the `-d` option to the `javac` command.
9. In the last text box, Java WorkShop lists a directory where the source files will be placed.
   If you want the source files to be located in another directory, replace this directory with the one you want to use.
10. If you want to add existing files to this Java package project, click the Yes radio button.
11. Click Finish.

Java WorkShop creates the project `.prj` file using the name, source file names, and other information you supplied, and stores the project in the directory you specified. The project name is added to the project manager.

If you are creating a new source file, the source editor opens with the file projectname.`java` loaded. If you are using existing source files, the project manager opens with the new project selected.

You can change the default attribute values for the project by choosing Edit -> Project. See Editing Project Attributes for information.

See also:

  Creating an Applet Project
  Creating a Standalone Program Project
  Creating a Beans Project
  Using the Create Project Wizard