Creating Your Java First Program

Your first application, HelloWorldApp, will simply display the greeting "Hello World!"To create this, just follow the steps below :

    - Open Netbeans and create a new project by clicking the New Project icon on the NetBeans toolbar :

    NetBeans is originally a Java IDE. NetBeans was originally developed by a team of students in Prague, then acquired by Sun Microsystems. Somewhere in 2002, Sun decided to make NetBeans open-source. But NetBeans is not just a Java IDE. It is also a platform, allowing you to write your own Swing applications. Its design is completely modular: Everything is module, even the platform. This makes NetBeans a toolbox that can easily be improved or modified.

    Then choose a  Java Application project from  Java category.

    The license of NetBeans allows to use it for free for commercial purposes or not. It allows to develop any type of applications based on the NetBeans platform. The modules you could write can be open-source as they can be closed-source, they can be free, as they may be chargeable.

    Click Next, and choose a name for your project (in the Project Name text box).
    Make sure that  the box "Create Main Class"  is checked  (this will create a Java application with a predefined main class), then click Finish:

    NetBeans IDE and the NetBeans platform are both available under the CDDL license. The CDDL license is an open source license recognized as such by the Open Source Institute. The Mobility Pack, and C / C ++ are also available under CDDL license. The Enterprise and Profiler Pack are not currently available under Open Source license.

    As you can see, NetBeans created the first class and the main () function in which we will write our code.

    Type this line of code in the main () function:

    System.out.println ("Hello World");
    You get then the following code :

    package firstapp;

    public class FirstApp {

    public static void main(String[] args) {
    System.out.println ("Hello World");


     The NetBeans installer for Windows no longer works under Windows 98-2000-xp-win7-win10 But you can also download a Zip archive, which you can decompress in a directory. You will then need to go to the configuration file yourself to tell NetBeans the location of the JDK that will be used by NetBeans.


      Leave a Reply