javac not recognized

后端 未结 11 1364
再見小時候
再見小時候 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:11

    This just means that javac isn't in your PATH variable.

    On Windows, you just have to add the folder that contains javac.exe to the PATH environment variable (Win+Pause/Break).

    On Linux/Mac/Unix, just append that directory to $PATH in .bashrc or similar.

    0 讨论(0)
  • 2020-12-10 07:11
    • Check whether you have JDK installed; if not installed, Install
    • If JDK is installed, navigate into the bin folder of the installation, and try to execute javac.
    • If javac executes, proceed (+:
    • If javac does not execute, check your system path, and java path, and return to 2 above!
    0 讨论(0)
  • 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).

    0 讨论(0)
  • 2020-12-10 07:18

    You have to install JDK (which includes javac compiler) and ensure that it's in the path. See http://java.sun.com/javase/downloads/index.jsp

    0 讨论(0)
  • 2020-12-10 07:19

    For Windows

    Control Panel > System...Then click Advanced System Setting (left pane)...then popup window will open...then click Environment Variables...Then another window will open...click New and add enter information below

    Variable name: PATH

    Variable value: C:\Program Files\Java\jdk1.7.0_45\bin [*make sure this is the right path for you]

    Then it should work

    0 讨论(0)
提交回复
热议问题