javac not recognized

后端 未结 11 1375
再見小時候
再見小時候 2020-12-10 06:33

What can I do when I keep receiving the error

\'javac\' is not recognized as an internal or external command, operable program or batch file

11条回答
  •  不思量自难忘°
    2020-12-10 07:16

    The error that you are seeing is generated by Windows, and isn't specific to Java. That error means that you typed a command and Windows could not find the command by that name.

    The easiest way of rectifying the situation is to ensure that Java is properly installed in your system's PATH.

    First, ensure that you have a JDK installed (and not just a JRE). Your next best bet is to add an environment variable called JAVA_HOME and point it at the base install directory for the version of Java that you installed.

    Next, modify your PATH environment variable by prepending the string %JAVA_HOME%\bin; to whatever is already in your PATH. If you look at the contents of that directory, you will see that javac is in there (along with a number of other Java development tools).

提交回复
热议问题