wuth an example i can make you understand. let the path of your folder is e:/java/program, where program is folder in which your programs are stored.

then in cmd prompt u'll use:

c:/> e: ...