Setting the Path

Setting the Path variable allows you to run the Java SDK executable programs, such as java and javac, from any directory on your system. It is a very good idea to set this variable, for convenience. If you do not set the Path variable, you need to specify the location of the javac compiler and java runtime every time you try to compile and run a program. Here's how to set it.

On Windows

In Windows 2000, set the Path like this: click Start > Settings > Control Panel > System > Advanced Tab > Environment Variables. Create a variable called path and set its value to the location of the <J2SDK-install-location>\bin directory. For example, it might be this:

C:\Program Files\Java\J2SDK1.5.0\bin

The Path can be a series of directories ...

Get Java Garage now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.