Search code examples
javacompiler-errorspathjavacsystem-variable

Java and javac not working in cmd. Both java and javac "is not recognized as an internal.."


I am having som trouble with java, i have tried to fix my Path, but i am new to programming and don`t know what to do.

I have java installed at : C:\Program Files\Java\jdk1.8.0_92\bin

and at : C:\Program Files (x86)\Java\jdk1.8.0_91\bin

Here are some screenshots from my system variables: This pops up when i click on the system variable "Path", see the other picture.

enter image description here

System variables

enter image description here

When I am in cmd, and writing java -version or javac -version, I get this message:

"java/javac is not recognized as an internal or external command, operable program or batch file".

Have tried to restart cmd every time i have changed the path.


Solution

  • Try Setting separate variables for JDK & JRE

    Also give a backslash "\" after bin in the case of both JDK & JRE

    Hope this works