Reputation: 41
I am using Windows 7 and 8 in my PC .
I have installed jdk 7
and created class path for bin
as it should be. But when I enter javac
in the command prompt, it throws an error:
`javac is not recognizing as internal and external`.
I have searched for a solution in many websites but nothing could solve my problem. Would you please help me and suggest where my mistake could be?
Upvotes: 4
Views: 6198
Reputation: 11940
You need to set the environmental variables. Run sysdm.cpl
from run dialog box to open advanced system properties.
In the environmental variables, add a new one like in this dialog.
Name : JAVA_HOME
VALUE: C:\Program Files\Java\jdk1.7.0_21\
Now edit the value of the PATH
variable and add ;%JAVA_HOME%\bin\;
at the end of it's value.
Now, restart your system and you can run java related commands from command prompt.
Upvotes: 5
Reputation: 51
It is path
not classpath
- -till your bin
folder
and restart cmd
Upvotes: 0
Reputation: 1
Double check your system variable "Path" on System Properties appending %PATH_TO_JDK%\bin. Don't forget to restart the command prompt after.
Upvotes: 0
Reputation: 5366
also set path in your *System variables:path=c:/..../jdk/bin/;c:/..../JRE/bin;.;
user Variables:CLASSPATH=c:/..../jdk/bin/;c:/..../JRE/bin;.;
Upvotes: 0