Creating a Java Package Project

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

To create a Java package:

  1. Check the WorkShop tool bar for the name of the current portfolio.

    If it is not the portfolio in which you want to create the project, choose Portfolio => Choose and select another portfolio name.

  2. Choose Project => Create => Java Package.

  3. Type the name of the project in the Project Name field.

    Make sure you are consistent in the use of capitalization in project and file names (even if you are working on Windows NT or Windows 95, where file names are not case-sensitive). The Java WorkShop is case-sensitive.

  4. Type the name of the Java package in the Package Name field.

  5. Type the root directory of the class hierarchy in the Root Directory field.

    For example, typing mydir causes the .class files for the classes in the java source file to be saved in the directory mydir. This field is equivalent to the -d option to the javac command.

  6. Type the directory name in which you want to store the project in the Source Directory field.

    If the directory does not exist, the WorkShop will create it. You should create a project in its own directory.

  7. If sources exist for the package:

  8. Click Apply.

The Java WorkShop creates the project .prj file using the name, source filenames, and other information you supplied and stores it in the directory you specified. The project name is added to the Project => Choose, Edit, Remove, and Copy submenus.

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 Portfolio Manager opens with the new project selected.

You can change the default attribute values for the project using the Project Manager. See Editing Project Attributes for information.


See also:

Creating an Applet Project
Creating a Standalone Program Project
Creating an Image Project
Creating a Remote Applet Project
Java Package Tab