Fix: ‘Java’ is not Recognized as an Internal or External Command

Here's how to recognize Java in CMD with a few tweaks of the path or a fresh install

by Tashreef Shareef
Tashreef Shareef
Tashreef Shareef
Windows & Software Expert
Tashreef Shareef is a software developer turned tech writer. He discovered his interest in technology after reading a tech magazine accidentally. Now he writes about everything tech from... read more
Reviewed by Alex Serban
Alex Serban
Alex Serban
Windows Server & Networking Expert
After moving away from the corporate work-style, Alex has found rewards in a lifestyle of constant analysis, team coordination and pestering his colleagues. Holding an MCSA Windows Server... read more
Affiliate Disclosure
  • 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.
java is not recognized as an internal or external command
XINSTALL BY CLICKING THE DOWNLOAD FILE
To fix various PC problems, we recommend DriverFix:
This software will keep your drivers up and running, thus keeping you safe from common computer errors and hardware failure. Check all your drivers now in 3 easy steps:

  1. Download DriverFix (verified download file).
  2. Click Start Scan to find all problematic drivers.
  3. Click Update Drivers to get new versions and avoid system malfunctionings.
  • DriverFix has been downloaded by 0 readers this month.

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?

In this article

1. Check if Java is properly installed on your PC

via Control Panel

  1. Open the Start menu and select Control Panel.
  2. Then go to Programs. Look for Java on the list (you can have either JRE or JDK installed).
  3. If you find it here, you will also be able to check the current version and the build number.
  4. If not, it’s likely that you don’t have Java installed.

via Command Prompt

  1. Open the Start menu and type CMD.
  2. Select and open Command Prompt.
  3. Next, type in this command: java -version

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: C:/Program Files/Javaversion/bin
  • 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.

Expert tip:

SPONSORED

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

  1. Press Windows Key + R to open Run.
  2. Type control and click OK to open the Control Panel.
  3. Search for Advanced System Settings.
  4. Click on the View advanced system settings option.
  5. On the System Properties window, open the Advanced tab.
  6. Click the Environment Variables button.
  7. Under the System Variables section select Path.
  8. Click the Edit button. Check Environment Variables in System Properties 3
  9. In the Variable value editor, click New.
  10. Enter the following path: C:\Program Files\Java\jdk1.7.0_72\bin java is not recognized as an internal or external command
  11. Click OK to save the changes and restart the command prompt to check for any improvements.

Notes:

  • 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:

SPONSORED

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.

This article covers:Topics: