How to set Java JDK environment path in Windows 7

I found Java really interesting Language and as an Software Engineer you have to learn Java to progress in your career. To learn the Java language one must be master in C Language. The C++ knowledge will add the weight to your learning ability but is not essential.
Here we will try to learn the Java programming language for the beginners, I will present you the simple and solid tutorials which will thoroughly guide you to learn this Language. To start with you need the Java JDK Environment which is similar to your TCC/Tc or the GCC compiler. Those who don’t have can downland it from here .


                                                                   DOWNLOAD


After Installing the Jdk  (Assuming the path as “C:\Program Files\Java\jdk1.6.0_24\bin”), you have to set the this as the home path where the JDK is installed along with bin. The reason behind doing this is to allow the Windows to know where  the Java compiler is.
How to set the JAVA JDK path in Windows 7,Windows Vista and Windows Xp:
There are two ways to do the thing but doing it with Command prompt would be the easiest way. To start with  the Command prompt hit “cmd” in the search after clicking on start. Now enter the command as shown in the screen shot and hit enter it will set your path automatically. Now you are ready to run your first Java program.

How to install Java JDK and Run java Program:
Above is the installation guideline for the Java , to run the first program open a notepad and type the following code as it is and save it as “First.java” this is very important otherwise your program wont get compiled.
class First{
  1.   public static void main(String args[]){
  2.   System.out.println("Welcome to Java" );
  3.  }
  4. }



Here we are saving the program in D:\Java folder so open the Command Prompt again and set your directory where you have saved that program.
type “d:” to move your directory and go to Java folder. type “javac and file name” this will compile your result. again type “java First” this will run your program.


0 comments:

Related Posts Plugin for WordPress, Blogger...
Copyright © 2013 futureX | Blogger Template by Clairvo