Friday, December 4, 2009

How To Set Environment Variable In Java

Environment variables are used to run the java programs from any location.
For Windows Vista
Right Click Computer -------> Properties -------->Advanced system settings ----------> Click Environmental variables
Goto System variables section --------> Click New

  variable name -----> PATH
  variable value ---------> C:\Program Files\Java\jdk1.6.0_12\bin(Your java path)
then goto command prompt
Type javac
Method 2:
  If you don’t want to set environmental variable
You can also set  java path for current location using following commands
got to DOS Prompt
   set PATH=%PATH%;C:\Program Files\Java\jdk1.6.0_12\bin
   set CLASSPATH=%CLASSPATH%;C:\Program Files\Java\jdk1.6.0_12\bin
( . indicates current path )


Post a Comment

The Link Exchange - Your ultimate resource for link exchange!

About This Blog

  © Blogger template Webnolia by 2009

Back to TOP