Click "Start" => "My Computer"
Click on the main drive
Go to "Program Files" (Mostly "C:\Program Files") Now Find Java Folder
From the "Properties Window" click "Location" and Copy the folder path.(In my computer: "C:\Program Files\Java\jdk1.6.0_16\bin")
Now go to Desktop (or Start => My Computer) and Right click on the My Computer and click "Properties".
In "System Properties" click on the "Advanced" tab.
Now Click on the "Environment Variables".
In the Environment Variable window click "New" to create a new variable
Now in the Variable Name field type "Path" without " mark.
And Variable value is where the compiler is(we copied it...remember..)... Paste it here(Mine is C:\Program Files\Java\jdk1.6.0_16\bin)
Now click ok.
To test:
Go to command line(Start Menu => Run => type "cmd" without " marks.
Now type "javac" without " marks.
If you see something like this.... Usage: javac .....
You correctly did it....
No comments:
Post a Comment