FIX: Java is not recognized as an internal or external command.

This guide contains instructions to fix the error “Java is not recognized as an internal or external command”, in Windows 10/11.

The error “java is not recognized as an internal or external command, operable program or batch file”, can appear when you try to run an application packaged as a JAR file, or when you try to view the installed version of Java from the command line using the command “java – version”.

Java is not recognized as an internal or external commandJava is not recognized as an internal or external command

The mentioned error usually appears because there is no Java installed on your machine, or because the JAVA executable file cannot be found.

FIX: Java is not recognized as an internal or external commandFIX: Java is not recognized as an internal or external command

How to FIX: Java is not recognized as an internal or external command on Windows 10/11.

Method 1. Install JAVA.

The first method to fix the “java is not recognized as an internal or external command” is to download and  install JAVA on your machine. If you already installed Java and you receive the error, then skip to Method-2.

 

Method 2. Add JAVA Path to Environment Variables.

Another cause of the Java error “java not recognized as an internal or external command”, is that system does not know where to find the Java executable file. In such a case, proceed and add the PATH of the Java executable in Environment Variables.

1. Press Windows imageimage + R keys to open the Run command box.
2. Type control sysdm.cpl and press OK (or Enter), to open the System Properties.

System PropertiesSystem Properties

 

3. In System Properties, select the Advanced tab and then click to open the Environment Variables.

FIX: Java not recognized as commandFIX: Java not recognized as command

4. In System Variables section, click the Path and then click Edit.

System Variables - Edit PathSystem Variables - Edit Path

 

5. In Edit Environment variable window double-click at the first empty line and then click Browse.

System Variables - Add JAVA PathSystem Variables - Add JAVA Path

 

6. Now, according of the installed JAVA version (64bit or 32bit), navigate to one of the following paths, select the bin folder and click OK.*

  • C:Program FilesJavajre-versionbin
  • C:Program Files (x86)Javajre-versionbin

* Notes:
1.
Where “jre-version” is the version of the installed Java. e.g.

  • C:Program FilesJavajre1.8.0_361bin
  • C:Program Files (x86)Javajre1.8.0_361bin

2. If you have installed Java JDK navigate to the JDK path. e.g.

  • C:Program FilesJavajdk1.9.0_27bin
  • C:Program Files (x86)Javajdk1.9.0_27bin

 Add JAVA PathAdd JAVA Path

7. After adding the Java path, click OK three (3) times to close all windows.

FIX Java not recognized as commandFIX Java not recognized as command

8. Finally restart your computer to apply the change (or restart the command prompt and run your Java command again.)

Method 3. FIX “Java not recognized as command” by reinstalling Java.

If none of the above methods solved the “Java is not recognized as an internal or external command” problem, proceed to remove and reinstall Java according to the instructions below.

1. Download and run the Java Uninstall tool.
2. Choose Agree at the first screen. *

* Note: If prompted that “There is only one up-to-date Java version detected. Are you sure to continue?” click Yes.

Java Uninstall toolJava Uninstall tool

 

3. Select all the installed Java versions and click Next.

image_thumb[37]image_thumb[37]

4. Click Yes again to clean the cache

image_thumb[43]image_thumb[43]

5. When the uninstall is completed, click the Get Java button or navigate to Java Download page to download and install the latest Java version. *

* Note: If you use 32-bit and 64-bit browsers, you will need to install both 32-bit and 64-bit Java in order to have the Java plug-in for both browsers. You can download both Java versions from here.

image_thumb[44]image_thumb[44]

6. After installing Java on your system, check if the problem is solved.

That’s all folks! Which method worked for you?
Please leave a comment in the comment section below or even better: like and share this blog post in the social networks to help spread the word about this solution.

If this article was useful for you, please consider supporting us by making a donation. Even $1 can a make a huge difference for us.

Hình ảnh thuộc sở hữu của trang web qnet88.comHình ảnh thuộc sở hữu của trang web qnet88.com

Đánh giá post
[related_posts_by_tax posts_per_page="6" title="Bài liên quan" taxonomies="category,post_tag"]

Trả lời

Email của bạn sẽ không được hiển thị công khai. Các trường bắt buộc được đánh dấu *

Hotline: 0974.0707.83(Zalo/Viber)