Skip to content
Advertisement

Java path problems, ‘java’ is not recognized as an internal or external command, operable program or batch file. (javac too)

I know there are lot of questions like this but i tried their solutions and nothing.

While i try to javac file.java i get ‘javac’ is not recognized as an internal or external command, operable program or batch file. And java file ‘java’ is not recognized as an internal or external command,operable program or batch file.

My environment path is enter image description here

(JAVA_HOME) C:ProgramFIlesJavajdk-15.0.2 and (Path) C:ProgramFIlesJavajdk-15.0.2bin

🙁

Advertisement

Answer

There is a typo in the path. Correct me if I’m wrong but on Windows

JAVA_HOME should be C:Program FilesJavajdk-15.0.2 and PATH should start with %JAVA_HOME%bin;.

Next time, just copy-paste the path from Windows Explorer to avoid this.

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement