Thursday 30 August 2012

Cause for the problem and the solution

Here we need to know why 'javac' is not recognized as an internal or external command, operable program or batch file occurs?

For this problem we have to install the JDK software or we need to set the path of the JDK's bin folder.

This solution will show how to set the value for PATH variable.
To do so consider the following information.

Before set the value of PATH variable we can check whether the Java has installed in your computer or not are as shown below,

Steps are as follows,

Open Command Prompt, in command prompt type 'java'. If java is present in your computer the below window will appear.


then in same window type 'javac'. if the value of PATH variable has not been set then below line will appear.

" 'javac' is not recognized as an internal or external command, operable program or batch file"

The window will appear as shown below,


To overcome this problem we need to set the value of Path variable.

Consider the following steps,

First step is to click on Control Panel in the Start Menu the window will open as shown below,


Second step is to click on System and Security, below window will popup,


Then click on System and the window will appear as shown below,


Then Click on Advanced System Settings the dialog box will popup as shown below,



Then click on Environment Variables and the dialog box is as shown below,



Here don't consider System Variables, so consider User Variables.
So there click on New...
After clicking the New... below dialog box will appear,


Here we have to write "path" inside the 'Variable name' field
and also we have to set Variable value for the path.

For this we need to install JDK (Java Development Kit) and after this we have to copy the address of the bin  folder.
Suppose our JDK is installed in Program Files, inside that one folder by name Java inside, that we have JDK folder and inside that we have bin folder.
for example: C:\Program Files\Java\jdk1.6.0_11\bin

As shown above we need to fill the value for "Variable Value" field.
this can be as shown below,


After this click on OK.

Now check whether the 'javac' is working properly or not. If the javac is working properly then the following window will come in command prompt.