Tuesday, November 29, 2016

How to Set Environment Variable Path of JDK 7 on Window 8

'javac' is not recognized an internal and external command ,operable program and batch file This error means you need to set Environment variable Path of jdk you can set path on command prompt also and this post is written to teach you how to set environment variable path from control panel setting on window 8.
Follow all steps and set Environment variable path of JDK.

How to Set Environment variable path on cmd:

To set path using cmd First navigate to directory where your file is located assume your file is in Programs folder in C drive.
Type
C:\> cd \Programs
This makes C:\Programs the current directory.
C:\Programs> dir
This displays the directory contents.
C:\Programs> set path=%path%;C:\Program Files\Java\jdk1.7.0_45\bin
This tells the system where to find JDK programs/Files.

Now you can Run your program using javac program_name.java
There will be no error saying javac is not recognized if you set your path perfectly
This is my Path where my jdk is located your path may vary

"C:\Program Files\Java\jdk1.7.0_45\bin"

Now i will tell you how to set environment variable path from control panel permanently then there will be no need to set path each time

How to Set Environment variable path manually:

Firstly Open Control Panel:

control panel in window 8

Search "Environment Variables" in Control Panel, and click "Edit the system environment variables".

environment variable in control panel

CLick Advanced Tab and then Click Environment  Variables

environment variable in system properties

Select Path and then Click on Edit:

edit path in system properties

Now Add Path of Bin folder here
My full path of the bin folder of the JDK is:
C:\Program Files\Java\jdk1.7.0_02\bin

So add "C:\Program Files\Java\jdk1.7.0_45\bin" in the path string.
set environment variable path in system properties

Click OK
Re-open Windows 8's "cmd" window, now You can use java and javac anywhere.

set environment path in cmd

Hope this Post helped you to Set Environment Variable Path and if you Face any error then Comment me in comment This all procedure which i state you is self tested by me and working fine and if you student of Programming then don't forget to bookmark us we have so many articles on C/C++ Programming, C# Programming. Assembly  Language Programming and Now i started to Add some Java Programs so Stay with us.