[July 2023 - Solved] javac is not recognized as an internal or external command, operable program or batch file
If you are trying to run the java application but unfortunately it throws an error saying : "javac is not recognized as an internal or external command, operable program or batch file"
- This is the pure indication that it is not identifying the java jdk in your system.
Steps to follow:
1) Firstly, you need to make sure you are having java jdk for your operating system.
Java JDK can be downloaded from official website: https://www.oracle.com/java/technologies/javase/jdk17-archive-downloads.html
As mine is windows 11 64-bit, I chose
2) Once the JDK is downloaded, continue to complete the setup till end.
3) Now, we have Java in our system, we need to tell the path to our system
In most of the windows systems, the path would be in:
C:\Program Files\Java\jdk-17\bin
We need to add this path in
Windows search > Environment variables
,choose Edit insidePath in System Variables
-
Click New and paste the path as shown below:
4) [Last Step] Adding the same path in User Variables
Relaunch cmd and try to check the java version: java --version
Congratulations, Happy Coding!!
If you find this Blog helpful, please drop a like to this Blog! Thank you!!