The Java is not recognized as an internal or external command in Command Prompt 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.