Configuring JAVA Class Path

After installing the Java Development Kit, the next step it to configure Java by setting up its class path of Environment Variables in Windows. Without configuring the class path in Java, your computer system will not be able to compile the java programs, even if you have installed JDK (Java Development Kit) successfully, and it will give an error message like 'javac' is not recognized as an internal or external command in CMD if you will try to compile any .java file. So it becomes very necessary to configure java to compile the java programs in your machine.

Here is a step by step guide on how to Configure Java and its class path in Windows including Windows 7 and Windows 8. We have also added images on how to configure java class path, so you can easily understand :

1. Firstly goto Desktop and right click on the My omputer icon and click on 'Properties' option. It will display the basic information of your computer.
2. Now select the "Advanced System Setting" option as shown in below image.

3. After that a pop up window will appear, select "Environment Variables" on it.

4. Now goto "System" variables and select "Path" variable from it and click on edit option of it as shown in below image.

5. By default the path variable is already set to multiple locations. To set the Java directory path to the path variable, firstly give a semi colon (;) at the end and after that write your default Java >> JRE >> bin path which is like C:\Program Files\Java\jdk1.7.0_25\bin and click OK.
Note : You can also directly paste the path of your Java>>bin directory here.

Now, your path variable is successfully configured along with JDK. You can check this via entering java compiler command i.e. "javac" in your command prompt.



Post a Comment