Getting class not found error while submitting a solution

“Error: class not found: Main.java
spoj: The program compiled successfully, but main class was not found.
Main class should contain method: public static void main (String[] args).”

I get the above error when i am trying to submit solution.
It runs fine on the code chef IDE but clicking on submit button gives this error.
Its bit weird and frustrating as well . There is no such error in code.
Here is the link for the solution :CodeChef: Practical coding for everyone

Can anyone help me with this ?