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

555 Views Asked by At

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.

2

There are 2 best solutions below

1
On BEST ANSWER

Try Setting separate variables for JDK & JRE

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

Hope this works

5
On

First go to this path to make sure that it is right. second try to restart your cmd and try again.