To compile java code in command promt , you need to register the java variable to the windows Environment variable .
Follow the step below :
Step 1 |
Choose the tab Advanced->Environment Variables
Under "User variables for user", if there is no variable named "path"
then add it by clicking "New".
Enter Variable name : path
Enter Variable Value : C:\Program Files\Java\jdk1.6.0_10\bin;
(Note : it will vary on different computer as your java may be of different version)
Click OK.
Done.
Step 2 |
To test , Go to Start->run.
Write "cmd" and click OK.
On the command line , type "javac" and press enter.
you will find something like this .
Success !.
Step 5 |
No comments:
Post a Comment