The New Java Project with Existing Sources wizard enables you to create a new
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:
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.