0% found this document useful (0 votes)
61 views4 pages

Netbeans Ide Java Quick Start Tutorial: Setting Up The Project

This document provides a tutorial for creating a simple "Hello World" Java application in NetBeans IDE. It describes how to set up a new project, add the code to print "Hello World!", and run the program. The tutorial guides the user through generating a project template, editing the generated code to print the message, and running the program to test it works as expected.

Uploaded by

Leney Nadeak
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
61 views4 pages

Netbeans Ide Java Quick Start Tutorial: Setting Up The Project

This document provides a tutorial for creating a simple "Hello World" Java application in NetBeans IDE. It describes how to set up a new project, add the code to print "Hello World!", and run the program. The tutorial guides the user through generating a project template, editing the generated code to print the message, and running the program to test it works as expected.

Uploaded by

Leney Nadeak
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

NetBeans IDE Java Quick Start Tutorial

Welcome to NetBeans IDE!

This tutorial provides a very simple and quick introduction to the NetBeans IDE workflow by
walking you through the creation of a simple "Hello World" Java console application.
Once you are done with this tutorial, you will have a general knowledge of how to create and
run applications in the IDE.

To complete this tutorial, you need the following software and resources.

Setting Up the Project


To create an IDE project:

1. Start NetBeans IDE.


2. In the IDE, choose File > New Project, as shown in the figure below.

https://netbeans.org/kb/docs/java/quickstart.html
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.

https://netbeans.org/kb/docs/java/quickstart.html
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.

Adding Code to the Generated Source File


Because you have left the Create Main Class checkbox selected in the New Project wizard,
the IDE has created a skeleton main class for you. You can add the "Hello World!" message
to the skeleton code by replacing the line:
// TODO code application logic here

with the line:


System.out.println("Hello World!");

Save the change by choosing File > Save.

https://netbeans.org/kb/docs/java/quickstart.html
The file should look something like the following code sample.
/*
* 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!");
}

Compiling and Running the Program


To run the program:
 Choose Run > Run Project.
The next figure shows what you should now see.

Congratulations! Your program works! 

https://netbeans.org/kb/docs/java/quickstart.html

You might also like