Kartier Pohs

Friday, June 19, 2015

How to set path in Java

There are two ways to set path in java
1-Temporary Path
2-Permanent Path
How to set path in Java

1-How to set Temporary Path of JDK in Windows
To set the temporary path of JDK, you need to follow following steps:
  • First of all Open command prompt
  • Then copy the path of jdk/bin directory
  • Finally write the entire path in command prompt: set path=copied_path
set path=C:\Program Files\Java\jdk1.7.0_25\bin


2-How to set Permanent Path of JDK in Windows

To set the permanent path of JDK, just follow the following steps:
  • Go to MyComputer properties 
  • Advanced tab
  •  Environment variables
  •  New tab of user variable
  •  Write path in variable name
  •  Write path of bin folder in variable value 
  •  Press ok
 
 Windows XP:
  1. Select Start, select Control Panel. double click System, and select the Advanced tab.
  2. Click Environment Variables. In the section System Variables, find the PATH environment variable and select it. Click Edit. If the PATH environment variable does not exist, click New.
  3. In the Edit System Variable (or New System Variable) window, specify the value of the PATH environment variable. Click OK. Close all remaining windows by clicking OK.
  Windows Vista:
  1. From the desktop, right click the My Computer icon.
  2. Choose Properties from the context menu.
  3. Click the Advanced tab (Advanced system settings link in Vista).
  4. Click Environment Variables. In the section System Variables, find the PATH environment variable and select it. Click Edit. If the PATH environment variable does not exist, click New.
  5. In the Edit System Variable (or New System Variable) window, specify the value of the PATH environment variable. Click OK. Close all remaining windows by clicking OK.
Windows 7:
  1. From the desktop, right click the Computer icon.
  2. Choose Properties from the context menu.
  3. Click the Advanced system settings link.
  4. Click Environment Variables. In the section System Variables, find the PATH environment variable and select it. Click Edit. If the PATH environment variable does not exist, click New.
  5. In the Edit System Variable (or New System Variable) window, specify the value of the PATH environment variable. Click OK. Close all remaining windows by clicking OK.

 

No comments:

Post a Comment

Copyright 2015 @ Yogesh Prasad