18 Sep 2011

Install JDK and Run The First JAVA Program

Hi Folks. Now its Time get The hands on Some Real Core Part Of Programming.These Days I'm messing with Programming in JAVA. So I just Thought to Write this Article on Installing the JDK(Java Development Kit). Without much wait lets get our hands on JAVA..

You Can Download the JDK1.6.0 from here

Once You get the file extract it and click on the main setup File.

Click-> Accept

Then Click-> Next
and now the installation Start

Once its Finish.. The installation of Java Run Time Environment also start

Click-> Next


Once the installation is Over. Click -> Finish.Hence The Installation of JDK is Finish. Its Time To configure it


Now, Right Click->My Computer. Select Properties.
Then select->Advanced Tab->Environment Variables
From Environment Variables.. in System Variables box select->path
then click->Edit
Then at the end in the Variable Value Box Type:
   C:\Program Files\Java\jdk1.6.0\bin; 

Remember To Put the Semicolon(;) at the End of Line.
Then Press OK. Now the JDK is Configured Properly.  :)

Compile and Execute The JAVA program :

Now Lets Try to Run our First JAVA Program.
Open Notepad and type the Following Code
Now, Save As->First.java
Say we Save this File at the Location- E:\Java (where Java is the name of a Folder)

Now go to->Run. Type-> cmd
You will see the Command Prompt Window.
Now Follow the Commands From the Image below.
Command To Compile The File is -> javac First.java
Command To Execute The File is -> java First.

Now, Finally you See the Output as-> Hello World !!
That's it.
Now You can try it with different Programms. Always Compile and Execute the Programs in the Similar way. Now Its Up to you.. try some Different Codes in JAVA as its a Fun in Learning this Programming Language. Happy Programming !! ENJOY !! :-)

0 comments:

Post a Comment

 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | Online Project management