How to install Java JDK and NetBeans?

Posted on Mar 15, 2011 @ 09:30 PM by ThePhantom

Java is multi-purpose, object oriented, and cross-platform programming language; an as of today it is the most widely used programming language. The JDK (Java Development Kit) contains the Java compiler, debugger, Javadoc, and Jar. These tools will help you start programming with Java. To download the JDK follow these steps and you will be ready to go in minutes. 1. Go to and click on the NetBeans icon to download the JDK + NetBeans bundle. NetBeans is an IDE (Integrated Development Environment). 2. Click the Download link under the JDK 6 Update 24 with NetBeans 6.9.1 3. Select your OS platform; check the Agreement checkmark and Click Continue. 4. Now, click the filename to start the download. 5. Once the installer is downloaded you should see a similar screen. Click next to start the installation. 6. Now it is requesting the installation path. By default the path should be C:\Program Files\Java\jdk1.6.0_24. I recommend using the default. Click Next. 7. At this point it is once again asking for the path; but this time it asks for the NetBeans Path. I also recommend using the default C:\Program Files\NetBeans 6.9.1. Click Next. 8. Now it gives you a summary of the installation. Click Install to start the Installation. 9. Once the installation has finished you should see a screen similar to this one. These options are optional you can check them or not, it's up to you; now Click Finish. At this point the JDK and NetBeans IDE should have been successfully installed. Now let's set-up the Environment Variables in our system so we can start running .java files from command line. Follow these simple steps and you will be set. 1. Open up Computer from the Start menu. Go to the Local Disk (C:) drive and open it up. 2. Now open Program Files, then Open Java. 3. At this point you should see a folder called jdk1.6.0_24 Open that folder. 4. Now open the bin folder and you should see a screen like this one. Copy the path to this folder which should be C:\Program Files\Java\jdk1.6.0_24\bin 5. Right Click Computer from the start Menu, and click Properties. 6. Click Advanced System Settings. 7. Then make sure that you are under the Advanced Tab in the System Properties Dialog Box, and click Environment Variables. 8. Now look for the System Variable PATH under the System Variables section and click Edit 9. Type a colon ";" at the end of the Variable Value field and then paste the path to the JDK bin folder that you copied already, and click OK, and continue clicking Ok until the System Properties Dialog Box is closed. Finally we are ready to start coding in Java. One final step is to check that everyting is working. Let's open notepad and type the following Java Code.
  1. public class HelloWorld {
  3. public static void main(String[] args){
  5. System.out.println("Hello World From Digital Phantom");
  7. }
  9. }
Now, let's save that file as 1. Click File > Save As. Select your Desktop as the destination and make sure that the Save as Type dropbox is set to All Files. Type for the filename and Slick Save. 2. Now Open Command prompt from Start Menu > All Programs > Accessories > Command Propmt, and type the following cd Desktop and press enter, to switch to the Desktop directory where we saved the java file. Now type javac and press Enter 3. At this point it should have created a file HelloWorld.class in the desktop. Now type in Command Prompt java HelloWorld . if You See "Hello World From Digital Phantom" then you have successfully completed your Java installation This concludes the installtion of the JDK and Netbeans. There will be more tutorials soon, so keep tuned.