Download JDK, Netbeans IDE and create your first project

Posted by Tunde Michael | Thu Oct 13, 2016 02:21 PM | Viewed: 1378

The first step in learning anything is usually the hardest. As humans we tell ourselves one thousand and one reasons why we can do a lot of things we would have loved to do. The achievers among us are the ones whom despite all these noises of doubt and excuses in their heads find a strong enough reason to follow their heart and get that thing done.

If there is anything that can be overwhelming, it’s programming. Truth be told programming especially Java is hard to a lot of people. So you need to have a very strong reason for wanting to learn to code. Although in my first article I talked about ways to learn programming without quitting your day job, in this post I’m going get you started, yes I said it, get you started in coding and i hope you find a strong enough reason to drive yourself to achieve this ambitious dream of learning to code. Trust me it’s going to be worth it at the end especially with a whole new career opportunities that will open up to you.

Probably the most beautiful thing about programming at this time in the world’s history is the fact all the tools and technologies you need are completely free. And now you’re getting this guide free among many other tutorials out there. Enough talk, we have work to do.

Now let’s discussed the steps one after the other:

     1. Download the Java Development Kit (JDK).

Java Development Kit (JDK) is the first thing you need to install and you can get it on the Oracle official download page.

Select the latest Java SE Development Kit on the download page for your system, be it Windows, Mac or Linux, accept software license and click the link to download. (The latest is usually the first on the panel). When the download is complete, follow these 2 steps:

  • Click on the downloaded file to start the installation
  • Follow the installation instruction and accept all default settings.

 

      2. Download NetBeans IDE 8.2

Just like in any trade or business, you need tools to get things done. To write, compile and run Java codes, Netbeans IDE is the best I know  (IDE stands for Integrated Development Environment) .  And at the time of this writing version 8.2 is the latest. Follow these steps to install Netbeans IDE:

  • Logon to the official download page
  • Click to download the package with all the modules (recommended)
  • Double click the downloaded file to lunch the installer and follow the installation instructions
  • Accept license and default settings in order not to complicate things

If everything goes well up onto this place, I say congratulations because you’re now ready to write, compile and run java codes so let’s go to the next step where we will create our first project.

      3. Create your first Java project

Now that you’ve installed all the tools needed, let’s create your first project together

  • Lunch the newly installed Netbeans IDE
  • When the IDE finally loads, click on the File tab on the menu bar
  • From File click on New Project and type HelloWord in the project name column
  • Leave other fields as default and click finish.

At this point the code editor will open and you will have something similar to below:

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package helloword;

/**
 *
 * @author Tunde Michael
 */
public class HelloWord {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here
    }
    
}

Right after the code below,

// TODO code application logic here

type the following code word for word 

System.out.println("Hello World My name is Tunde Michael");

Then you will have:

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package helloword;

/**
 *
 * @author Tunde Michael
 */
public class HelloWord {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here
        System.out.println("Hello World My name is Tunde Michael");
        
    }
    
}

Now let's run our application to see what we have achieved. To do that, click on the Run tab on the menu bar and select Run Project (HelloWorld). After a while a new window will open at the bottom in the IDE with a message like below:

run:
Hello World My name is Tunde Michael
BUILD SUCCESSFUL (total time: 2 seconds)

And that's it. 

Congratulations! If you have made it this far you absolutely have what it takes to be a great Java developer.

 

 


Share this post
facebook twitter googleplus linkedin





Comments (1)


InnoVicta InnoVicta

Yes!!! Thanks
Thu Apr 20, 2017 12:36 AM

Newsletter: Never miss a thing