Setting the Classpath

     

If java is still unable to find your program, you might have to change your CLASSPATH variable. The CLASSPATH variable is where the java program looks to find classes to include when it executes.

In your CLASSPATH setting, make sure that . is included, to indicate the present working directory, as well as any custom directory you make to store class files, such as C:\garage\classes.

In Windows 2000, set the CLASSPATH like this:

  1. Click Start > Settings > Control Panel > System > Advanced Tab > Environment Variables.

  2. Find the one called CLASSPATH (or make it if it doesn't exist) and add the preceding directories to it.

  3. Create this variable as a system variable if it does not exist. Also, make sure that the JAVA_HOME location correctly points to the top-level directory of your Java installation. This is probably C:\Program Files\Java\J2SDK1.5.0 on Windows.



Java Garage
Java Garage
ISBN: 0321246233
EAN: 2147483647
Year: 2006
Pages: 228
Authors: Eben Hewitt

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net