NetBeans-SCSNI

3.1-Demonstrate the ability to create NetBeans projects from the source code of an existing Java SE program.

New Java Project with Existing Sources Wizard: Name and Location

The New Java Project with Existing Sources wizard enables you to create a new  standard project  from an existing Java SE source folder. You open the wizard by opening the New Project wizard and selecting the Java Application with Existing Sources template from the General category.

In the Name and Location page, you have to set the following properties:

  • Project Name. Specifies the display name of the project.
  • Project Location. Specifies the folder where you want to store the project metadata and source code. You can place the project folder in the source folder or keep it in a separate location.
  • Use Dedicated Folder for Storing Libraries. When selected, you can specify a Libraries Folder where required compilation libraries are stored.
  • Libraries Folder. Specifies the location of the folder containing shared libraries. Click Browse to specify a location other than the default.
  • Set as Main Project. Sets the newly created project as the main project.

When you click Finish, the project is created on your computer and opened in both the Projects window and the Files window.         


New Java Project with Existing Sources Wizard: Includes & Excludes

The New Java Project with Existing Sources wizard enables you to create a new standard project from an existing Java SE source folder. You open the wizard by opening the New Project wizard and selecting the Java Application with Existing Sources template from the General category.

The Includes & Excludes panel is an optional step in the wizard which allows you to specify the packages you want to include when creating a new project. This can be useful if, for example, you are working from a large project that contains many packages maintained in the same location. You can filter the packages scanned from your existing sources by entering paths to the packages you want to either include or exclude. Classes that are not included will not be scanned when the wizard completes.

You can set the following properties:

  • Includes. Specifies the path or paths to packages you want to include. To enter a path, type in a path relative to the existing source folder that points to a package containing classes that you want included.
  • Excludes. Specifies the path or paths to packages you want to be excluded. To enter a path, type in a path relative to the existing source folder that points to a package containing classes that you want to be excluded.

When you enter a valid path in either the Includes or Excludes field, the corresponding Included Files and Excluded Files text areas automatically update to inform you of the files contained in the directories you specified.

Sample paths provided include: com/mycorp/, **/doc-files/, **/*.html. When using wildcards, note that an asterisk (*) signifies all existing options for a single directory, and a double asterisk (**) represents all possible combinations of super-directories from the root folder. For further information, including example patterns, see:  http://ant.apache.org/manual/dirtasks.html

When you click Finish, the specified packages are scanned and included in the new project. The project is created on your computer and opened in both the Projects window and the Files window.

-- Wagner R. Santos