Steps to Download, Install, Compile and Run Java on NetBeans !

My name is Subhash.K.U. I work as Principal Mentor at Subhash Programming Classes helping fresh engineering graduates and professionals crack their programming interviews through C, C++, Data Structures, Java and Linux Programming. 

In this blog, I have given the very basic steps that one should follow to get his first NetBeans IDE running. It is only a matter of minutes. Once you start, there won’t be anyone to stop you :) 

Step – 1

Download and install NetBeans Software from www.netbeans.org

Step-2

Creating a Project. 

1. Choose File, New Project to display the New Project dialog box.

2. Select Java in the Categories section and Java Application in the Projects section and click Next to display the New Java Application dialog box.

3. Type “Learning” in the Project Name field and D:\MyJavaPrograms in Project Location field. Make sure the folder MyJavaPrograms already exists in the D: directory.

4. Click Finish to create the project.

Java-NetBeans-1

Java-NetBeans-2

Java-NetBeans-3

Step-3

Creating a Class

1. Right-click the top “Learning” node in the project pane to display a context menu. Choose New -> Java Class to display the New Java Class dialog box.

2. Type Welcome in the Class Name field and select the Source Packages in the Location field. Leave the Package field blank. This will create a class in the default package.

3. Click Finish to create the Welcome class. The source code file Welcome.java is placed under the <default package> node.

4. Type the source code inside the Welcome class in the editor and keep it ready for compilation.

Java-NetBeans-4

Java-NetBeans-5

Java-NetBeans-6

Step-4

Compile and Run a Class

To run Welcome.java, right-click Welcome.java to display a context menu and choose Run File, or simply press Shift + F6. The output is displayed in the Output pane.

Java-NetBeans-7

Written by:

Subhash.K.U,

Principal Mentor,

Subhash Programming Classes,

Bangalore.

I love to teach you ! Click here !

KNOW ABOUT ME

No Comment

You can post first response comment.

Leave A Comment

Please enter your name. Please enter an valid email address. Please enter a message.