user2729614
user2729614

Reputation: 41

Even when I defined the class path, javac is not recognizing it

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

Answers (4)

Sri Harsha Chilakapati
Sri Harsha Chilakapati

Reputation: 11940

You need to set the environmental variables. Run sysdm.cpl from run dialog box to open advanced system properties.

enter image description here

In the environmental variables, add a new one like in this dialog.

enter image description here

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.

enter image description here

Now, restart your system and you can run java related commands from command prompt.

Upvotes: 5

nirbhay mishra
nirbhay mishra

Reputation: 51

It is path not classpath - -till your bin folder and restart cmd

Upvotes: 0

pfurtado
pfurtado

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

KhAn SaAb
KhAn SaAb

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

Related Questions