How do I convert my Eclipse project to an earlier Java version?

The second method provided by Colin worked for me.

Here is a visual representation of all steps for that approach:

enter image description hereenter image description hereenter image description hereenter image description here


I thought Eclipse would do this automatically. Any ideas?

No Eclipse does not clean all projects until you ask it to do so. It only cleans the generated class files of the sources you have modified. You should do a clean build of your solution, rebuild everything and run again, it should work just fine.


First, clean your project:

Project > Clean

If that doesn't fix things...

Second check your project specific java compiler:

Project > Properties > Java Compiler