Javac is not found

前端 未结 7 2020

I\'m running Windows 8 and I can not get javac to work.

I have set my PATH in environmental variables to

C:\\Program Files (x86)\\Java\\jdk1.7.0_17\\

7条回答
  •  暖寄归人
    2020-12-25 14:36

    do this: 1. run CMD (WIN+R then type in CMD) 2. Type this:

    set PATH=%PATH%; java installation path\bin

    Replace "java installation path" with the directory JDK is installed in, such as C:\Program Files (x86)\Java. Be sure to add the \bin after the JDK directory, because this points to "javac" and "java" (BIN stands for "binaries")

    This way, you can run the Java compiler from anywhere. It is impossible to CD to the JDK directory because it has a space in Program Files, and DOS will not let you CD to these directories.

提交回复
热议问题