Home » Javac Command Not Found

Javac Command Not Found

by Online Tutorials Library

Javac Command Not Found

Javac command is usually used to check whether the Java is installed in our system or not. When the Java is not installed in our system and we try to run Javac command, we get Javac command not found or Java is not Recognized. We can also get this error when Java is installed in our system but the path is not added to the system’s environment variable.

Javac command is used to compile our java program. When the compiler doesn’t find the javac.exe file, our command prompt shows the Javac Command Not Found or path is not recognized error.

Javac Command Not Found

Resolve Javac Command Not Found Error

In order to solve this issue, we first have to installed Java or jdk in our system. If the jdk is already installed in our system, we have to add the path variable into our system’s environment variable. This path is basically is the location of that folder where the java.exe file is present. So, it is required to add the bin directory because java.exe file is available in bin folder.

In our system, the path of the bit folder is as follows:

In order to set the path to the environment variable, we have two options. The first option is to set the path temporary and another one is to set the path permanently.

  1. We go to the command prompt and type the following command and press the enter key. Once you press the enter key, the path is set to the specified location. After running this command, we can compile and run the java program.
  2. If we want to set the path permanently, we have to follow the following steps:
    1. We go to the advance system setting by clicking on the Advance system settings option of our system.
      Javac Command Not Found
    2. When we click on the Advance system settings, a dialog box will be open. From this popup, we click on the Environment Variables.
      Javac Command Not Found
    3. When we click on the Environment Variables, a new dialog popup for setting path permanently. We will click on the New button to set path and for that it open New User Variable dialog.
      Javac Command Not Found
      Javac Command Not Found
    4. We give variable name Path and path of the bin directory of JDK folder will be the value of it. We create a new user variable only when there is not path variable. If it already exists, we edit it and add path value to that variable.
      Javac Command Not Found
    5. If the path variable is already exists, we select the Path variable and click on the Edit
      Javac Command Not Found
    6. When we click on the Edit button, it will open a new dialog and from that dialog we click on the New button to add path of the bin directory and click on the Ok
      Javac Command Not Found
      Javac Command Not Found
      Javac Command Not Found

You may also like