Project wizard

The Project wizard creates a JBuilder project file, which has a .jpr or .jpx file extension. Both project file types are available in all editions. The .jpr file type is suitable for most purposes. The .jpx file type is an XML file that is easily shared.

The project file contains the project settings and a list of all the files added to the project. Project settings will vary according to the type of project you create, but can include directory structure, paths to libraries, sources, JDK versions, and relevant deployment settings. JBuilder uses the list of files and the project settings whenever you load, save, change, build, or deploy a project.

To open the Project wizard, use one of the following options:

You don't edit a project file directly, but it is modified whenever you use the JBuilder development environment to add or remove files or to set other options. You can see the project file as the top node of the project tree in the project pane.

Select name and template for your new JBuilder project

Set the project name, type, working directory, and template. Decide whether to generate a project notes file.

Name and Type

Set the name and type of the project file JBuilder creates. The default name is untitled. The default type is .jpx. Use the .jpx project file type for shared projects. Use either project file type for projects that aren't shared by other JBuilder users.

Directory

You can click the ellipsis button (...) to browse to the directory you plan to use as the root directory of the new project. If you previously chose the target directory as the root for a previous project, you can choose it from the drop-down list.

This directory is called the working directory or the project directory (these two terms are synonymous.)

Template

Select the project you want to use as a template for the present project. This sets the default paths and directories. All paths and names can be changed later, either in Step 2 or in the Paths page of the Project Properties dialog box. This option only sets default behavior.

Choosing the Default project template sets the root path to lead to the jbproject directory in your home directory, and makes your source, backup, documentation, and output directories the descendants of your project directory.

Choosing another project as the template sets the new project's paths so that the new project directory (with its descendants) is a subdirectory of the template project's project directory.

Click Next if you want to change any default paths or make a project notes file. If you're satisfied with the default settings, want to compile against JBuilder's default JDK, don't need to add libraries, and don't want a project notes file, you can click Finish in Step 1.

Specify project paths

Set your paths in Step 2.

Note: All paths on this page can be changed at any time in the Paths page of the Project Properties dialog box (Project|Project Properties.)

JBuilder sets suggested project, source, backup, documentation, and output paths. If need be, you can edit these fields directly or click the ellipsis buttons (...) to browse to other locations.

JDK

The version that ships with JBuilder is set by default.

To compile against another JDK, click the ellipsis button (...) to open the Select A JDK dialog box. Within this dialog, either browse to a registered JDK location or else click New to open the New JDK Wizard, from which you can set a path to a different JDK.

Output Path

The output path stores generated files and defined resource files. Edit the field directly or click the ellipsis button to browse to the desired path.

To define individual files and project-wide file types as resources, see Build page: Resource tab.

Backup Path

The backup path stores backup versions of files. Edit the field directly or click the ellipsis button to browse to the desired path.

Set the number of backup levels from the Editor page of the Editor Options dialog box (Tools|Editor Options.) The default level is 5. The maximum is 90.

Working Directory

This is also known as the project directory. It has the same name as the project file.

It's generally the parent directory of the source directory. It's often the parent directory of the output, backup, documentation, and library directories, but whether this is the case for the new project depends on the directory structure the project is created from and on the choices you make here in Step 2.

Buttons on tabbed pages

The Source, Documentation, and Required Libraries pages each have a column of buttons on the right.

Add

Provides a browser that lets you choose or enter a new path. The new path is added to the bottom of the list.

Edit

Provides a browser that lets you change the selected path.

Remove

Removes the selected path from the list.

This does not remove that directory or otherwise affect your directory tree, it only removes it from the search list.

Move Up and Move Down

Change the position of the selected path by one step up or one step down for each click. This changes the order in which the paths are searched.

This does not change the location of the directories, it only changes the order in which JBuilder searches them.

Reset

Resets this list to the state it was in when the dialog box was opened.

Source tab

Set default and test source paths on the Source page. It's possible to choose the same path for both functions.

The default source path is used by wizards that create source files. Adding additional source paths means the project works with multiple source roots. Note that imports automatically select all the source directories as source roots.

Note: JBuilder uses the path you set for the purpose specified. However, if JBuilder can't find the specified source path, it will go through the list of available paths from the top down. Sort your paths to control which one is searched first in this case.

Unit Testing and the Test path are features of JBuilder Enterprise. The test path is used as the source path when you use JBuilder's unit testing features. This provides the option of using a different area for testing so you can easily separate your tests from your other code. This is most useful in deployment.

Documentation tab

Displays the path or paths that contain the HTML documentation files for the JDK selected in the JDK field. This allows reference documentation to be displayed in the doc view in the content pane.

Required Libraries tab

Sets the libraries needed by the project at runtime.

If necessary, add libraries or make new ones. Click Add to browse to an existing library in the Select One Or More Libraries dialog box. You can click New in this dialog to bring up the New Library Wizard.

There are three possible colors for libraries listed:

Colors in library lists

Color Description Troubleshooting
Black The library is defined correctly.  
Red The library definition is missing. This typically means the project refers to a library that is not yet defined. It can also mean the library has been defined without any paths.
Gray Use of this library requires an upgrade. You need to upgrade your edition of JBuilder in order to use this library. For example, if you have JBuilder Personal, use of the dbSwing library requires that you upgrade to either JBuilder Professional or Enterprise.

Specify general project settings

This information can later be changed on the General page of the Project Properties dialog box (Project|Project Properties).

Encoding

Encoding determines how JBuilder should handle characters beyond the ASCII character set. The default is your platform's default encoder.

Enable Assert Keyword option

Choose this if you want assert recognized as a keyword and to enable JDK 1.4-style assertions. assert takes a boolean value and checks a state before the associated statement is executed.

Automatic Source Packages

This is a feature of JBuilder Professional and Enterprise.

Enable Source Package Discovery And Compilation

This option is checked by default. It makes several things happen:

  1. All packages in the project's source path appear in the project pane (upper left pane) of the IDE.
  2. Packages that contain Java files are compiled automatically.
  3. Files generated by this compilation are copied to the project's output path.

Note: Not all packages are displayed, only a logical subset determined by how deeply you tell JBuilder to expose packages.

Deepest Package Exposed

JBuilder exposes packages to the level you set, unless adding more levels to a particular package won't change the length of the overall package list.

Class Javadoc Fields

This is the information that shows in the About box for your application. If you use a wizard that generates header comments, this information also goes into the header comments when that wizard's Generate Header Comments option is checked. These fields must be edited before using a wizard for the Javadoc comments to appear at the beginning of the class files.

Select a field to edit and enter the appropriate text in the Text column.

Include References From Project Library Class Files

This is a feature of JBuilder Professional and Enterprise.

Check this option if you want to be able to find references in any of the project libraries. It's unchecked by default.

Checking this means that: