Setting the Path for Java
After you install the JDK, you need to configure your OS so that it can find the JDK command line tools. Start by setting the Path environment variable — a list of folders that the OS uses to locate executable programs. To do this on a Windows XP, Windows Vista, or Windows 7 system, follow these steps:
1. Click the Windows (Start) button and then right-click Computer (Windows 7 or Vista) or My Computer (XP).
This brings up the System Properties page.
2. Click the Advanced tab (XP) or the Advanced System Settings link (Vista and 7); then click the Environment Variables button.
The Environment Variables dialog box appears.
3. In the System Variables list, scroll to the Path variable, select it, and then click the Edit button.
A dialog box pops up to let you edit the value of the Path variable.
4. Add the JDK bin folder to the beginning of the Path
value.
Note: The name of the bin folder may vary on your system, as in this example:
c:\Program Files\Java\jdk1.7.0\bin;other directories...
5. Click OK three times to exit.
The first OK gets you back to the Environment Variables dialog box; the second OK gets you back to the System Properties dialog box; and the third OK closes the System Properties dialog box.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access