Site icon TestingDocs.com

Common Java Error Messages

Overview

In this tutorial, we will learn common Java error messages and solutions to fix the errors.

Javac not recognized

‘javac’ is not recognized as an internal or external command,
operable program or batch file.

If we receive this error, that means Windows operating system is not able to find the Java compiler.

Fix

First things first, check if JDK is installed on the machine.

On Windows operating system, javac.exe is found under the JDK bin folder. We usually point to the JDK folder with the JAVA_HOME environment variable. Check the variable correctly points to the JDK folder.

\> echo %JAVA_HOME%

We usually update or append the bin folder to the PATH environment variable to avoid extra typing at the command prompt. Check the PATH environment variable.

\> echo %PATH%

The PATH environment variable is a series of folders separated by semicolons. Windows operating system looks for programs in the PATH folders list. The JDK ‘bin’ folder should be present in the PATH folders list.

 

Java Tutorials

Java Tutorials on this website:

https://www.testingdocs.com/java-tutorial/

For more information on Java, visit the official website :

https://www.oracle.com/java/

Exit mobile version