Even when I defined the class path, javac does not recognize it

I am using Windows 7 and 8 on my PC. I installed jdk 7 and created a class path for bin , as it should be. But when I enter javac on the command line, it throws an error:

  `javac is not recognizing as internal and external`. 

I searched for a solution on many sites, but nothing could solve my problem. Could you help me and suggest where is my mistake?

+4
source share
4 answers

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

enter image description here

In the environment variables, add a new one, as in this dialog box.

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 this value.

enter image description here

Now reboot your system and you can run Java related commands from the command line.

+5
source

also specify the path in * System variables: path=c:/..../jdk/bin/;c:/..../JRE/bin;.;

User variables: CLASSPATH=c:/..../jdk/bin/;c:/..../JRE/bin;.;

0
source

This is path not classpath - if there is a bin folder and restart cmd

0
source

Double-check the system variable "Path" for "System Properties" by adding% PATH_TO_JDK% \ bin. Remember to restart the command line after.

0
source

Source: https://habr.com/ru/post/1499637/


All Articles