- If 'Java' is not recognized as an internal or external command, operable program, or batch file, you need to take a closer look at the variable paths.
- Usually, it's the missing Bin directory that causes havoc, but there can be other places where Java is disabled.
- We'll show you how to recognize Java in CMD, but first, you need to make sure it's properly installed.
While trying to compile a Java program or running tools like Activit BPM you may encounter the ‘java’ is not recognized as an internal or external command, operable program or batch file error. Now, two big questions arise and we shall try to address them both accordingly.
Why my Java version is not showing in CMD? You might be wondering, and legitimately so, what’s this all about. Since this is a common Command Prompt error, the reasons can vary depending on the user.
Then, there is the most important matter of how to recognize Java in CMD. So, let’s take a closer.
Why is Java not detected on my computer?
This error can occur due to multiple reasons including:
➡️ an incorrect path for java.exe file – In this case, the system variables such as JDK or JRE \bin directory may not be not properly set
➡️ Java is not installed or not enabled
Here are some of the most common problems related by users worldwide:
- Java not recognized after setting path
- ‘JAVAC’, JRE, ‘MVN’, JAR’ is not recognized as an internal or external command, operable program or batch file. If you’re unable to run JAR files, we have a few extra tips for you.
- Minecraft, Arduino, VScode, IntelliJ: ‘Java’ is not recognized as an internal or external command, operable program or batch file.
- Java is not recognized as an internal or external command Windows 10 (64 bit, 32 bit)
- Java is not recognized as an internal or external command Windows 11
How do you fix Java is not recognized as an internal or external command operable program or batch file?
1. Check if Java is properly installed on your PC
via Control Panel
- Open the Start menu and select Control Panel.
- Then go to Programs. Look for Java on the list (you can have either JRE or JDK installed).
- If you find it here, you will also be able to check the current version and the build number.
- If not, it’s likely that you don’t have Java installed.
via Command Prompt
- Open the Start menu and type CMD.
- Select and open Command Prompt.
- Next, type in this command:
In addition to these two methods, you could also try to check:
- the Bin directory because the Java folder is usually located in this path:
- your hard drive and look for the executable file Java.Exe
If the java is not recognized as an internal or external command error persists and should Java be installed, it’s likely that the directory was not added to the path, making it unable to find Java at runtime.
Some PC issues are hard to tackle, especially when it comes to corrupted repositories or missing Windows files. If you are having troubles fixing an error, your system may be partially broken.
We recommend installing Restoro, a tool that will scan your machine and identify what the fault is.
Click here to download and start repairing.
Here’s what you need to do next.
2. Change the system variable path
- Press Windows Key + R to open Run.
- Type control and click OK to open the Control Panel.
- Search for Advanced System Settings.
- Click on the View advanced system settings option.
- On the System Properties window, open the Advanced tab.
- Click the Environment Variables button.
- Under the System Variables section select Path.
- Click the Edit button.
- In the Variable value editor, click New.
- Enter the following path:
- Click OK to save the changes and restart the command prompt to check for any improvements.
- Make sure you use the right version of Java. You can find the right path by navigating to:
- C:Program FilesJava.
- Once you have got the right version, add the bin directory to your path.
- Do not delete any other values in the Variable path editor.
3. Install a compatible Java version
If the issue persists, try installing the Java version that is compatible with your Windows OS.
For example, if you are using a 64-bit Windows 10, download and install the 64-bit version of Java. If you are using a 32-bit Windows OS, install the 32-bit version of the program.
Several users have reported the issue to have been resolved after installing the right edition of Java. Additionally, you can also install both versions of Java to use either 32-bit or 64-bit depending on your use.
⇒ Download Java latest version for Windows 10 [32bit / 64bit]
If you see a message telling you what version of Java you have installed, it means that you have it. However, if the installation cannot complete with Java error 1603, we have a few extra tips for you.
Now, Java can be downloaded on its own just as it can be a plug-in extension. If that is the case, you might want to check your browser as well and make sure the Java add-on is enabled.
The ‘java’ is not recognized as an internal or external command, operable program or batch file. error occurs if the environment variables are not configured correctly.
By adding the correct path to an environment variable, you can resolve the issue. If the error persists, try installing the compatible Java version.
If you know of any other solutions to this Java-related problem, leave us a message in the comments section below.
Still having issues? Fix them with this tool:
If the advices above haven't solved your issue, your PC may experience deeper Windows problems. We recommend downloading this PC Repair tool (rated Great on TrustPilot.com) to easily address them. After installation, simply click the Start Scan button and then press on Repair All.