This error usually occurs when you are trying to run your java program using java command as main class but java is unable to find the class.
To solve this you must try to familiarise with how java loads classes.
Usually it occurs because of incorrect CLASSPATH.
You will be able to find lot of guidance on how to set classpath directory online. Learn how its done and how java loads classes. You should be able to solve the issue quickly.