Thursday, 6 February 2014

First Java Program

What are requirement of simple Java Program ?
  1. You need to install JDK in your Computer,if not installed click to Download JDK and install it.
  2. You need to Set Path  
                 There are 2 way of Set Path
                                           1.Temporary Path
                                           2.Permanent
                               

               Temporary Path

                           1.Open the command prompt 
                           2. Copy the directory e.g c:\program files\java\jdk1\bin
                           3.Write in command prompt  e.g set path=c:\program files\java\jdk1\bin; 
    Let's See its given figure


                 Permanent Path

                          For Set Permanent path for JDK , you should follow this steps

          Go to My Computer(right click)-->Properties-->Advanced-->Environment variable-->new 

                           Set variable name and variable value
                               e.g:
                                     Variable Name :path
                                     Variable Vlaue :C:/Program Files/java/jdk1.7/bin; 

  Let's See Given figure :

      

                       

                 






Let's See the given figure 
         To cop the path from the address bar and paste into the variable value text box.







  After Set your variable name and Variable Value click-->OK-->OK-->OK.


    Now Open a command prompt and no need to set path . we can directly compile and run the Java program.

    

No comments:

Post a Comment