Many Java programmers and people using a programming language using the Java virtual machine recognize the error message “javac is not recognized as an internal or external command”. 


Two situations can cause this Java error on Windows

First, the Java Development Kit (JDK) program is not installed on your computer.

Second, JDK is installed on your Windows computer, and Windows 10 cannot find the file javac.


How to fix “javac is not recognized as an internal or external command”

Check if Java Development Kit (JDK) is installed on your Windows operating system. If java is not installed on your computer, download and install it on your windows operating system.


At the time of this writing, if you want to install the latest version of JDK, you will see that only 64-bit architecture is available on the java website. As a result, the default java installation folder is C:\Program Files\Java\, not C:\Program Files (x86)\java\ for 32-bit programs.


When the installation of JDK is done, copy the path to find the folder bin.


The 64-bit version of the Java Development Kit (JDK) has the default bin folder location “C:\Program Files\Java\jdk-VersionNumber\bin”.


Open the command prompt at the location where the Java bin folder is located.

cd C:\Program Files\Java\jdk-13.0.2\bin


To see the version of Java you are running on your Windows computer, type the command below and press enter.
java --version


If you see the version of java installed in your Windows operating system, there is only one last step left to do which is to put all the java executable files available in your Windows operating system.


How to set variable path in Windows 10

In the search bar, type advanced system settings and select view advanced system settings.

In the system properties window, select Environment variables.

Select path and click edit to open the Edit environment variables window.

Now click on new and add the path to find the bin directory of your Java Development Kit (JDK) version.

Java-8 C:\Program Files\Java\jdk1.8.0_162\bin
Java-9 C:\Program Files\Java\jdk-9.0.4\bin
Java-10 C:\Program Files\Java\jdk-10.0.1\bin
Java-11 C:\Program Files\Java\jdk-11.0.2\bin
Java-12 C:\Program Files\Java\jdk-12.0.2\bin
Java-13 C:\Program Files\Java\jdk-13.0.2\bin

Click OK to close the edit environment variable window.
Next, click OK to close the Environment variables window.
Click OK to close the System Properties window.


Check if javac is available in Windows

Open a new command prompt.

Type the command below and press enter.
javac --version


Java is not recognize