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

Updated on: 13-Jun-2020

526 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements