How to Run and Debug a java class

Hello,

Can anyone tell me how to run and debug a java class (not java service) ?

Regards,
Shashi Kumar