Running through command prompt( Possibly Path error?)

后端 未结 2 1217
自闭症患者
自闭症患者 2021-01-26 10:42

I have a problem when compiling my code from Notepad++ when i compile example( javac StudentApp.java). It does not compile but instead i get this error code - \"is not recognise

相关标签:
2条回答
  • 2021-01-26 11:29

    First be sure you have installed JDK , but not the JRE (jre comes without the javac).

    Here's how you can the JAVA_HOME\bin to your path (in case you have installed JDK):

    for /f  "delims=" %j in ('reg query "HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Development Kit\1.6" /v JavaHome') do @set jreg=%j
    set jreg=%jreg:    JavaHome    REG_SZ    =%
    setx PATH "%jreg%\bin";%PATH%
    
    0 讨论(0)
  • 2021-01-26 11:29

    Thanks everyone i got my solution i left out the bin directory which was " C:\Program Files (x86)\Java\jdk1.7.0_45\bin;" at the start of my path. Hope this helps anyone else with the same problem.

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