NetBeans IDE Java Quick Start Tutorial
NetBeans IDE Java Quick Start Tutorial
Version Required
version 7.2 or 7.3
3. In the New Project wizard, expand the Java category and select Java Application as shown in the figure below.
Then click Next.
4. In the Name and Location page of the wizard, do the following (as shown in the figure below):
In the Project Name field, type HelloWorldApp.
Leave the Use Dedicated Folder for Storing Libraries checkbox unselected.
In the Create Main Class field, type helloworldapp.HelloWorldApp.
5. Click Finish.
The project is created and opened in the IDE. You should see the following components:
The Projects window, which contains a tree view of the components of the project, including source files,
libraries that your code depends on, and so on.
The Source Editor window with a file called HelloWorldApp open.
The Navigator window, which you can use to quickly navigate between elements within the selected class.
System.out.println("Hello World!");
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package helloworldapp;
/**
*
* @author <your name>
*/
public class HelloWorldApp {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
System.out.println("Hello World!");
}
}
For information on how to run the application from the command line, see the Starting Your Java Application chapter
of the Packaging and Distributing Java Applications tutorial.
See Also
You now know how to accomplish some of the most common programming tasks in the IDE.
To learn more about the IDE workflow for developing Java applications, including classpath management, see
Developing General Java Applications.
For more information on deploying Java desktop applications, see Packaging and Distributing Java Applications.
For detailed instructions on how to compile and run a simple "Hello World!" application on your operating system,
see the "The "Hello World" Application" lesson of the Java Tutorials.
To find information specific to the kind of applications you are developing, use the NetBeans IDE learning trail for that
type of application. Each learning trail contains a series of tutorials and guides that range in scope from basic to
advanced. The following learning trails are available:
General Java Development
PHP Applications
Integration with External Tools and Services
NetBeans Platform and Module Development
Java GUI Applications
C/C++ Applications
Web Services Applications
Mobile Applications
Java EE & Java Web Applications