Actually, the fix turned out to be trivial. I switched to the
java perspective from the navigation perspective. There was a red marker by the project name indicating there was a problem with some of the classes in the project. I fixed the problem and that allowed me to execute the class.
However, the class was just a
test class and not dependent on any other classes in the project. But still, eclipse didn't allow me to execute it.
thanks.