How to Fix ‘javac’ is not recognized as an internal or external command in Windows 11?

This error message, “javac is not recognized as an internal or external command,” may appear if you are just attempting to launch a Java program. When there is only JRE is found and JDK is not found on your system, this error message appears. The good news is that it’s not too hard to fix this problem. We will walk you through the process of fixing this problem on Linux and Windows in this article.
 
Step 1: Check if Java is installed
Open the Command Prompt by pressing Win + R, typing cmd, and hitting Enter.
Please type the following command in the command prompt and press enter.
Type command on cmd: java -version
Then you you will see details as shown in the above image which shows Java 17 is installed on my system. If you are not getting such a message on the command prompt that means the JDK path is not there in your system’s environment variable.
 
2. Set the PATH Environment Variable

A common cause of the ‘javac’ issue is that your system’s PATH does not contain the Java compiler. Take these actions to fix this:

a) Goto search box and type edit environment variable.   
Once you open you will see the system Properties window then click the “environment variables” button at the bottom of this window, it will open another window.
 
 

b) Once you click the Environment variable button it will open the below window.

c) Then click on the New button and add the path of the JDK folder from your system where you have installed JDK. If you don’t have JDK installed on your system. Please install first get the path and update here.

and then update the path in a variable as well. See the below image.

d) After setting this path, click ok and come out from the window just go to cmd type java -version, and check again. I hope this time you will get a message like shown in Step 1.

Indian Visa For German Citizens

Indian Visa For UK Citizens

Leave a Comment