What Is a Project?

Projects are the basic building blocks of the Java WorkShop. A project organizes the files required to produce an applet, a standalone program, a Java Package, an HTML image, or a remote applet. A project also includes information that defines the project's individual characteristics, such as the project's name and main class file.

The Java WorkShop stores a project in a file called projectname.prj. The Java WorkShop creates the file using the name, source filenames, and other information you associate with the project when you create the project.

After you create a project, you can add and update its information. For example, you might add information on how to display the project in the portfolio, how to display the project on an HTML page, or which compiler options to use to build the project. You never directly edit the .prj or other project files. The Java WorkShop updates the files based on the actions you perform in the Project Manager.

The project you are currently working with is called the current project. The current project sets the context for all tools in the WorkShop. For example, when you open the Debugger, you will be debugging the current project. The name of the current project appears in the WorkShop tool bar.

Project Types

In the Java WorkShop, you can create and maintain the following types of projects:

Applet
A program written in the Java language that runs within a Java-enabled Web browser, such as HotJava(tm). You can build, browse, debug, and run an applet in the Java WorkShop. You can also copy an applet from a portfolio and paste it into an HTML file.

Standalone Program
A program written in the Java language that runs outside a Web browser, usually from a command line. You can build, browse, debug, and run a standalone program in the Java WorkShop.

Java Package
A group of classes declared with the same package name. You can build and browse packages in the Java WorkShop.

Image
An HTML image, usually a gif file, to be used in the HTML tag <img>. You can run an image in the WorkShop. You can also copy an image from a portfolio and paste it into an HTML file.

Remote Applet
An applet that resides elsewhere on the Internet. You can run a remote applet in the WorkShop. You can also copy a remote applet from a portfolio and paste it into an HTML file.

The images shown above are the default images that appear in the portfolio when you create the project.

Project Files

For a file to be part of a project, it must be recorded in the project's .prj file. Project files include:

Nested Projects

Projects can be included (nested) as elements in other projects. Nesting projects is useful when you have a standalone program that imports packages you wrote. You create each package and the standalone program in its own project. To make sure the imported packages are always up to date, you include the package projects in the standalone program project.


See also:

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