- Click on Start
- Under Settings, click on Control Panel
- Click on the System icon
- Click on the Advanced tab
- Click on Environment Variables button
- Highlight PATH in the top panel and click the
Edit button
Don't change what's there --
you are going to add to the PATH value
- Edit the PATH so it begins with C:\Program
Files\Java\jdk1.5.0_06\bin;
(assuming you have installed J2SE5.0 update 6 in the default
location) and click OK
You have now set your PATH variable to find
javac and java commands at the DOs prompt.
You also need to set up a CLASSPATH variable to
tell Java where to look for classes. It must include the
current directory.
- If you already have a CLASSPATH variable, edit
it as above so it begins with .\;
If you do not have a CLASSPATH variable, create
one as follows:
- Click on the New button below the top panel
- For Variable name type CLASSPATH
- For Variable value type . (a
single period)
- Click OK
- Click OK to exit System Properties
- Close the Control Panel
- Restart your computer
- Test your installation by opening a DOS window to check that
both the javac and java commands are recognised.