Simran Kaur
Simran Kaur

Reputation: 1101

javac is not recognized as an internal or external command in windows 7

I have set JAVA_HOME and PATH variable.

JAVA_HOME looks like this:

C:\Program Files\Java\jdk1.8.0_60

PATH looks like this:

    %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;

    "C:\Program Files\nodejs\" "C:\Program Files (x86)\Brackets\command";C:\mongodb\bin;"C:\Program Files\cURL\bin" ;C:\Python34\python.exe; 

"%JAVA_HOME%/bin" ;

Yet it can not find any of the java commands like javac or java,

User Path variable:

 C:\Program Files\nodejs\node_modules\npm\; C:\Users\dev4\AppData\Roaming\npm; C:\mongodb\bin; " %JAVA_HOME%\bin\" ; "%ANT_HOME%\bin\" ;

System path variable:

%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\; C:\Program Files\nodejs\ ; C:\Program Files (x86)\Brackets\command;C:\mongodb\bin;C:\Program Files\cURL\bin ;C:\Python34\python.exe; %JAVA_HOME%\bin\;

Despite npm command is not working either.

These have been working before but since I was trying to set path for java , al of them have stopped working

Upvotes: 3

Views: 23573

Answers (3)

Kyrei
Kyrei

Reputation: 21

Don't do what I did and sit there wondering for an hour why the path isn't changing in your windows.

Change the Variable...

THEN RESTART YOUR PC

An hour I will never get back lost to not doing the first thing you should try.

Upvotes: 2

ji2495
ji2495

Reputation: 9

In my system, User variable path is as below

C:\apache-ant-1.9.5\bin;E:\Android\platform-tools;E:\Android\tools;C:\Users\M\AppData\Roaming\npm

And my system path variable is

C:\ProgramData\Oracle\Java\javapath;C:\Program Files\Java\jdk1.8.0_45\bin;C:\Program Files\nodejs\

JAVA_HOME is

C:\Program Files\Java\jdk1.8.0_45

Hope this helps.

Upvotes: -1

Subodh Joshi
Subodh Joshi

Reputation: 13482

Please use \ backslash not / forward slash That is the issue in your Path setup

enter image description here

EDIT :-

  1. Right-click the My Computer icon on your desktop and select Properties.
  2. Click Advanced system settings link.
  3. Click the Advanced tab.
  4. Click the Environment Variables button.
  5. Under System Variables, click New.
  6. Enter the variable name as JAVA_HOME Enter the variable value as the installation path for the Java Development Kit as C:\Program Files\Java\jdk1.8.0_60
  7. Now make entry for Path variable shown above image

Upvotes: 4

Related Questions