右键——>properties——>java compiler选中1.5以上 转载于:https://www.cnblogs.com/fpjason/archive/2009/08/29/1556179.html