Standard Java SE Project Properties Dialog Box: Sources

Use to view the location of the project folder, manage source and test package folders, as well as set the source level of the packages that the IDE uses.

Use the buttons on the right side of the panel to add, remove, and change the order of classpath elements.

Element Description

Source Packages Folder

Specifies the folder that contains the Java source code for the project.

You must set the Source Packages Folder to the folder that contains the default package.

Test Packages Folder

Specifies the folder that contains the JUnit test suites for the project.

You must set the Test Packages Folder to the folder that contains the default package. By default, when you create a project the IDE creates a test packages folder called test with the label Test Packages. Use the buttons to the right of the list to remove the selected folder or to specify the folder that the IDE uses when creating tests. You can also modify the Label field to change how the folder is displayed in the Projects window.

Source/Binary Format

Specifies 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 7.

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, switch to the Libraries tab and set the Java Platform setting to the minimum version on which you plan to deploy

Includes/Excludes

Includes or excludes 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 are compiled based on the supplied patterns.

Profile

Specifies the Java runtime environment (JRE) used.

Encoding

Specifies the character encoding the IDE applies when it saves and displays project source files.

The project character encoding determines how the IDE interprets characters in your source files. The IDE displays and saves any new files you create using the encoding set by the project in which they reside. The default character encoding used with projects is UTF-8. Use the Encoding drop-down to change the character encoding used with the project.


Note: Specifying the source/binary format does not change the Java platform whose libraries and executables are used to compile and run your project. To set the Java platform that is used for compiling and running your project, click Libraries and set the Java Platform setting accordingly. You cannot set the source/binary format of a project to a higher release than the project's Java platform.


Related Topics

Developing Applications with NetBeans IDE,

Developing Applications with NetBeans IDE,

Developing Applications with NetBeans IDE,

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