What is javac command used for ?
On windows OS ‘javac’ command reads source files that contain module, package and type declarations written in the java programming language, and compiles them into ‘class files’ that run on the JVM (Java Virtual Machine). The javac command can also process annotations in java source files and classes.
Role of Java Development Kit:- The JDK, there are mainly three tools which can be used in conjunction to develop Java applications called Java compiler ‘javac‘, ‘Java application launcher: java’. Java archive tool: jar.
Compiling Process of javac :- first Java source code is compiled to the bytecode with the help of javac compiler. Then, Java Virtual Machine (JVM) interprets and executes bytecode, javac can be called an excellent example of a compiler which belongs to an interpreter system.
So if in your PC laptop java is configured properly so this kind of error may occurs “javac is not recognized as an internal or external command” so we have to insure that JDK is installed and environment path is set properly.
Java Development Kit:- JDK is a Java software development environment provided by Oracle. It includes the JVM, compiler, debugger and other tools for developing Java applets and applications. every new version of the JDK adds some features and enhancements to the language.
JDK download 64 bit for windows 10
- After successfully installation of JDK set Environment Variables to solve this issue related to “javac is not recognized as an internal or external command”
2. Go to the “select Advanced System Settings”
3. then Click on “Environment Variables”
4. Under the “System Variables”, Select PATH and click edit, then click new and add path as “C:\Program Files\Java\jdk-17.0.2\bin”
Next restart your command prompt and open it and try javac.
Just after following some simple steps will help you in order to solve “javac is not recognized as an internal or external command” issue.