O'Reilly logo

Java Garage by Eben Hewitt

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required