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
set CLASSPATH=%CLASSPATH%;.
( . indicates current path )
0 Comments:
Post a Comment