Standard Web Project Properties Dialog Box: Sources

You open the Standard Web Project Properties dialog box by right-clicking any standard Web project and choosing Properties.

Use to set the locations for commonly-used directories within the project folder of a Java web project, such as the WEB-INF and Web Pages folders. It also allows you to specify the project's source package and test package folders, set the JDK version that corresponds to the project's source/binary format, include or exclude classes to be compiled with the project, and set the default project character encoding.

Use the buttons to the right of the panes to add, remove, and change the order of the package folders.

Element Description

Project Folder

(Read-only) Lists the directory on your computer where the project sources are located.

Web Pages Folder

Lists the webroot of the application. This is typically the web folder contained within the project folder.

WEB-INF Folder

Lists the location of the WEB-INF directory contained in the Java web application project. The WEB-INF directory is typically contained within the application's webroot.

Source Package Folders

Lists the location of the source package folders and the label used for them in the Project Properties window.

    Add Folder

Click to add a new package folder to the adjacent pane. In the Add Source/Test Folder dialog that displays, navigate to and select the folder containing the resources you want to add, then click Open. The resources are then added to the corresponding Package Folders pane.

Note: To edit the name of a package folder listed in either of the Package Folder panes, double-click the listed entry and type directly into the field.

    Remove

Select an entry in a Package Folders pane, then click the Remove button to delete it.

    Move Up

Select an entry in a Package Folders pane, then click Move Up to have it listed higher in the pane. The order in which packages are listed corresponds to the order in which they display in the Projects window.

    Move Down

Select an entry in a Package Folders pane, then click Move Down to have it listed lower in the pane. The order in which packages are listed corresponds to the order in which they display in the Projects window.

Test Package Folders

Lists the location of the test package folders and the label used for them in the Project Properties window.

Specifies the folder that the IDE uses when creating Unit tests. By default, when you create a project the IDE creates a test packages folder called test with the label Test Packages.

To create Unit tests with the IDE, a project must include a test package folder. If the test packages folder for your project is missing or unavailable, you can create a new folder in your project and then use this pane to designate the new folder as the Test Package folder.

Source/Binary Format

Set the lowest Java platform version with which the generated Java code should be compatible.

This setting corresponds to the javac -source option. Setting the source/binary format helps prevent you from using Java language constructs that are not available in the platform version to which you want to deploy. However, setting the source/binary format does not ensure that the platform APIs are used compatibly with that platform version. To make sure that your application is fully compatible with an earlier Java platform version, you need to switch to the Libraries tab and set the Java Platform setting to the minimum version on which you plan to deploy.

    Includes/Excludes

Click the Includes/Excludes button if you want to include or exclude specific classes in or from compilation. In the Configure Includes and Excludes dialog, use regex patterns in the Includes and Excludes fields to specify which classes on the project classpath you want to have compiled. The Included Files and Excluded Files panes list the resources that will be compiled based on the supplied patterns.

Encoding

Choose the character encoding that you want the IDE to apply when it saves and displays project source files.

Element Description

Source/Binary Format

Choose the JDK version that applies to the lowest Java platform version with which the Java code in your project is compatible. Default options range from JDK 1.2 to 6.

Includes/Excludes

Click the Includes/Excludes button if you want to include or exclude specific classes in or from compilation. In the Configure Includes and Excludes dialog, use regex patterns in the Includes and Excludes fields to specify which classes on the project classpath you want to have compiled. The Included Files and Excluded Files panes list the resources that will be compiled based on the supplied patterns.


Related Topics

Developing Applications with NetBeans IDE,

Developing Applications with NetBeans IDE,

Developing Applications with NetBeans IDE,

Copyright © 2016, Oracle and/or its affiliates. All rights reserved.