To Set Class Path in Windows Vista

The Class Path tells the Windows Operating System where to locate all the Java Classes that are required by Java Runtime Environment (JRE) to execute a program. The Class Path for most systems include the current directory by default. However, if the Java Classes reside in a different directory, you may want to add that to the Class Path in order to avoid changing the current directory at DOS Prompt command to the directory that contains the Java Class files for each Java program execution.

To Set Class Path in Windows Vista:
  1. Access Windows button in the Windows Desktop> Control Panel> System and Maintenance> System> Advanced system settings and click on the Continue button when the User Account Control window pops up
  2. Under the System Properties window, select the Advanced tab and click on the Environment Variables button
  3. Under the Environment Variables window, select CLASSPATH variable in the System Variables section and click on the Edit button
  4. Under the Edit System Variable window, adds a semicolon ( ; ) to the end of the existing Variable value and then adds the path for the Java Classes to the list ( C:\java\classes; )
You may confirm that the above Class Path is set correctly by typing set at the DOS Command Prompt. The C:\java\classes; should be visible.

0 comments:

Post a Comment