Compiling and Building


When you set up a project, the IDE provides a default classpath and compilation settings, so the project should be ready to compile as soon as you have added some classes to the project.

You can compile an individual file or package by right-clicking its node and choosing Compile. But more typically, you will "build" the entire project. Building, depending on project type, typically consists of compiling projects and subprojects and creating outputs such as JAR files for each of those projects.

To build your project, right-click the project's node in the Projects window and choose Build Project. If that project is currently designated as the main project (the project name is in bold in the Projects window), you can choose Build | Build Main Project or press F11. If you want to delete the products of previous builds before building again, choose Build | Clean and Build Main Project or press Shift-F11.

When you initiate a build, the IDE tracks the progress of the build in the Output window in the form of Ant output.

You can specify compiler options in the Project Properties dialog box. Right-click the project's node in the Projects window and choose Properties. Then click the Build | Compiling node to enter the options.


See Chapter 3 for more detailed information on building your project.



NetBeans IDE Field Guide(c) Developing Desktop, Web, Enterprise, and Mobile Applications
NetBeans IDE Field Guide(c) Developing Desktop, Web, Enterprise, and Mobile Applications
ISBN: N/A
EAN: N/A
Year: 2004
Pages: 279

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net