Creating workspaces, targets, and classes

What you do

First, create a workspace. A workspace contains targets, and targets contain forms and other classes.

Targets

A target is an application, applet, class, or collection that you create with PowerJ. Types of targets include:

You can run a target program anytime during a PowerJ session. PowerJ builds the target by compiling PowerJ files into Java class files and displaying the program’s user interface. Depending on the target type and your current run options, your application may be displayed in the applet viewer, in a Web browser, or as a standalone program.

Not all targets can be run. For example, you cannot run a set of Java class files that make up a class library, because it is not a complete application.

A WebApplication target can be used to tie other targets and files together into a single manageable package. It lets you organize, maintain, and publish all the files of an application for an intranet or the Internet.Similarly, archive file targets (ZIP, JAR, and CAB) can be used to collect other targets and files into a single archive file.

Each target has its own folder; this avoids naming conflicts when source files have the same name.

Workspaces

All work in PowerJ is done within a workspace, which is a collection of one or more targets. Your workspace can include all the targets involved in the complete application.

PowerJ creates a workspace definition file for a workspace. The file is a summary of the workspace and lists all the targets that belong to the workspace.

The Workspace view displays the targets in the current workspace. A target’s Build Options property sheet lets you specify options for building the target.

Classes

Each Java file in the target is a Java class. You can expand the targets in the left pane of the Workspace view to show classes as well as the properties, methods, and data members of individual classes. A pop-up menu lets you add new properties, methods, and events. In the right pane, you can further define your classes and attributes, and view and edit Java code.

Writing code

From the Workspace view, you can use the code page or open the code editor for a class or an individual method or event. In the editor options, you can choose to view all the code for the class or one method at a time. You can hide or view the code that PowerJ generates.