A problem which may occur in Eclipse is that it opens the
.classfile (the compiled file) instead of opening the
.javafile when you do this. This is probably caused by the order of the entries in the
Go to your project directory and open the .classpath file. Move all entires of type
kind="src"to the top of the file (or at least above any entries with kind "output").
Restart Eclipse and the problem should be fixed.