Java Reference
In-Depth Information
On the left side of the dialog is the list of categories of properties. When you select a property category, the details
are displayed on the right side. The following are brief descriptions of each property category:
Sources: It is used set source code-related properties, for example, source folder, format,
profile, encoding, etc. under the Sources category. The Profile property is new in Java 8. It lets
you select a compact profile compact1 , compact2 , compact3 , or full JRE. The default is full JRE.
When you select a compact profile, the IDE will restrict you from using the API outside of that
compact profile. The Includes/Excludes button lets you include and exclude fields from the
project. Use this button when you want to keep some files in the project, but do not want to
compile them, for example, the files may not be compiled as they are not complete.
Libraries : Among several properties, it lets you set two important properties: Java platform
and CLASSPATH . Clicking the Manage Platforms button opens the Java Platform Manager
dialog where you can select an existing platform or add a new platform. Use the Add Project,
Add Library, and Add JAR/Folder buttons to add projects, pre-defined set of JAR files, and
JAR/Folder to the CLASSPATH . This CLASSPATH is used to compile and run your Java project.
Note that the Java classes that you add to your project using the IDE are automatically added
to the CLASSPATH . The CLASSPATH is set for the project only for the NetBeans IDE.
Build : It lets you set properties for several subcategories. Under the Compiling subcategory, you
can set compiler-related options. You can choose to compile the source code when it is saved or
you can choose to compile the source code yourself using the menu options in the IDE. Under
the Packaging subcategory, you can set options for packaging your class files. The Deployment
subcategory lets you choose native packing options for your project. The Documenting
subcategory lets you set options for generating Java documentation for the project.
Run : This category lets you set properties that are used to run the project. You can set the Java
platform, JVM arguments. Using the category, you can set main class for your project.
Opening an Existing NetBeans Project
It is assumed that you have downloaded the source code for this topic. The source code contains a NetBeans 8.0
project. To open the project, follow these steps.
1.
Choose the Open Project menu item under the File menu. An Open Project dialog is
displayed.
2.
Navigate to the folder that contains the unzipped downloaded source code. The project
BeginningJavaFundamentals is displayed, as shown in Figure 2-17 .
 
Search WWH ::




Custom Search