Monday, December 23, 2013


Java is one of the widely used programming languages for developing all kinds of applications.
It might be because of the following reasons

  • Simple  --it is  very simple to use /implement
  • Robust  --it is 
  • Platform Independent 
  • Portable

When we write a java program which is in human readable format(.java file) is converted to machine readable format(.class file) and this process is called compilation.
javac is java compiler which does this process.


JAVA Installation and Setup


  • Download the jdk latest version from oracle.com
  • After downloading the jdk(java development kit)  if you try to execute the javac in command line it will not work because operating system does not know where the javac is present.



  • Set the required environment variables

I have installed my JDK in F drive.So i have appended the location value of javac to PATH environment variable as set PATH=%PATH%;F:\JDK\bin
So,In order to inform operating we need to set the  path variable to location of javac.

But one disadvantage of this method is every time you  open a new window you have to execute the above command.

So ,the better option is to add PATH environment variable ,by following this
 "My Computer" > "Properties" > "Advanced" > "Environment Variables" > "Path". I saved it.





Make sure that there are no extra spaces after the required path(if extra  space is there then it will not recognize javac command).

And there is also another option just save the command set PATH=%PATH%;F:\JDK\bin   in .bat file
and execute it every time when you tried to run javac command or any java program.







No comments:

Post a Comment