I made a program to send an email via Java using my gmail account and my program is given here "How to send email using JavaMail API". When i tried to run this program from command prompt, it shown error "Could not find main class". But when I build it in eclipse it got run successfully.