Java is installed and executed but javac command is not running it just showing
“javac is not recognized as an internal or external command”
I tried a lot to recover it I also have set the path as C:\Program Files\Java\jdk-11.0.1\bin
Java -version command is also working and showing this message
java version "11.0.1" 2018-10-16 LTS Java(TM) SE Runtime Environment 18.9 (build 11.0.1+13-LTS) Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.1+13-LTS, mixed mode)
But when I use command as javac myfile.java then it showed “javac is not recognized as an internal or external command”
Java execution problem
I also faced this problem I found the solution that I had installed JRE instead of JDK.
JRE VS JDK:
When downloading Java, you are offered a choice between:
- The Java Runtime Environment (JRE), which includes the necessary tools to run Java programs, but not to compile new ones – it contains
- The Java Development Kit (JDK), which contains both
javac, along with a host of other development tools. The JDK is a superset of the JRE.
You should check whether you have installed JRE or JDK