How to set CLASSPATH variable for JDK?



Assuming you have stored your Java programs in c:\myprograms\ directory −

  • Right-click on 'My Computer' and select 'Properties'.

  • Click the 'Environment variables' button under the 'Advanced' tab.

  • Now, add the 'CLASSPath' variable and set the path to the c:\myprograms\'.


Advertisements