Eclipse is fine, but you do have to know what you are doing. Duffy is correct that you have it set to compile at version1.4. Change this setting and your program will run fine.
Go into the following menus:
Window - Preferences - Java - Compiler
there change the Compiler compliance to 6.0 and use default compliance settings
Edited by: petes1234 on Feb 24, 2008 9:13 AM
I hope you've learned that when you ask a question you need to actually provide details about what's going wrong. You never did that in this thread, so it took far longer than was necessary to get to a very simple answer.