top of page

Making a Java Application using NetBeans IDE

  • Writer: Siah Peih Wee
    Siah Peih Wee
  • May 2, 2022
  • 1 min read

In this tutorial, you will learn to use NetBeans to develop a Java Application

ree

Setting Up the Development Environment

Start New Project

  • Start a New Project

ree

  • Choose Java with Ant > Java Application

  • Press Next

ree

  • Type in Project Name

  • Uncheck Create Main Class

  • Press Finish

ree

Create Your First Java Class

  • Right Click a Package > New > Java Class

ree

  • Type in Class Name

  • Press Finish

Notice there is a warning? This is because classes in other packages cannot access the classes in default package. Therefore, for this practice, we are just going to use one Main Class.

ree

  • Now you will see the code of the newly created class.

ree

  • Press Run Project

ree

  • You will see No Main Classes Found

  • This is because the class doesn't have a main function

  • Press Cancel

ree


  • Add a static function main that take in a Array of Strings as Arguments.

  • Use the function to print out Hello World!

ree

  • Right click your Project

  • Select Properties

ree
  • In the Properties

  • Select Run > Browse for Main Class

ree

  • Now you can see the class you have created

  • Select it and press Select Main Class

ree

  • You can now press OK

ree
  • You can now press OK

ree
  • You will see print out in the Output panel

ree





 
 
 

Comments


Post: Blog2 Post
  • Facebook
  • Twitter
  • LinkedIn

©2022 by Realization Lion. Proudly created with Wix.com

bottom of page