IT is Fun

September 3, 2007

Step-by-Step Java HelloWorld with using NetBeans

Filed under: NetBeans — themamakcorner @ 7:18 am

Download JDK 5 from http://www.netbeans.info/downloads/index.php

Double click on the downloaded installer to install it.

In my case, my root installation folder is at C:\Java

After the installation is done, you’ll be able to see that the Java 1.5 is located at C:\Java\jdk1.5.0_12

Once done with the installation, you need to set the environment. Follow the steps below to set the Java environment.

right click at My Computer, click on Properties

go to Advanced tab, click on Environment Variables

add/ edit JAVA_HOME

add/ edit PATH

Test the java installed.

Go to Run => type cmd

then type

java -version

check there java version

Download NetBeans 5.5 from http://java.sun.com/javase/downloads/index_jdk5.jsp

After done with the installation, run the netbeans.

To create a new application, go to File => New Project => Next

Choose General and Java Application => Next

At Project Name, type “HelloWorld” then click Finish

You will have a java application ready.

Now, go to the main, and add the following codes.

add println at main

build project

run project

the output

There you have, a simple HelloWorld using NetBeans..

No Comments Yet »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a comment

Blog at WordPress.com.