Error while running java program # Help Urgently

I am getting this Error while trying to run my java programs(In both practice sessions and contests).
I have been facing this issue for last 4 days. Even if i try to submit solutions to already solved and accepted problems where the solution code is already existing in same format, its showing error message.

The error message repeatedly flashing is

javap: error while loading shared libraries: cannot open shared object file: No such file or directory
spoj: The program compiled successfully, but main class was not found.
** Main class should contain method: public static void main (String[] args).**