![java logo java logo](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhABpF0uS4MXCmjouUBzmCIw4MVDpdElrCIoBoGKGGyBsWqdVAh0N6GjxErgNCx9mwSY7TjARmwMtfMPa8LYcjUc0Sx1jPBVnWUjk6uCeiNimygMWWc5gcwyN7oGJxeD48x9lWKf2D6e3T0/s1600/java+logo.jpg)
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