Set JDK bin Path for Java Permanently

The following illustrates setting JDK bin directory path for Java permanently in your Windows PC. Setting the path in command prompt every time is a surely a head ache because it is temporary i.e. every time you restart your command prompt you should type the set path again and again. So, isn't it better to set the path permanently in your PC without having to do this all the time? It is. Here is a sample photo gallery with description that guides you through setting the path in Windows.


 1. Go to My Computer.

Go to My Computer (Here from Desktop)
Go to My Computer
2. Usually Java is installed where OS is. So go to the drive where your OS is installed.

Go to drive where Java is installed

2. Go to Program Files in the OS drive.

Go to Program Files in OS drive.
Go to Program Files in OS drive


3. Go to Java in Program Files.

Go to the Java folder present in Program Files
Go to Java in Program Files

4. Go to jdk1.6.0_43 (for me). For you it depends upon the version you installed.

Go to jdk folder in Java
Go to jdk1.6.0_43 folder


5. Go to bin folder in Java.

Go to the bin folder present in jdk folder
Go to the bin folder

6. Copy the path in the location bar of Windows Explorer using Ctrl-A (to select entire path) followed by Ctrl-C (to copy the selected path).

bin folder in jdk1.6.0_43
Copy bin folder path to clipboard

7. Right click on My Computer and Click on Properties and then go to Advanced tab.

Click on Environment variables in Advanced tab in My Computer

8. Click on New button under User variables.


9. In the above image, you can see the Path variable with the value of the path that is in your clipboard (i.e. the path of the bin folder). Mine is already set. You can set it by click on the New button as said before and then you'll get two text fields. In the first one, type Path and in the second one paste the bin folder path that is copied to the clipboard by using Ctrl-V (paste shortcut) and then hit Enter or OK. Click on all OK buttons you encounter later. Restart your command prompts (if opened) only to see the effect. That's it your Java path is now set.

No comments: