1.右击.java文件,找到Build Path--->Configure build path;
2.Libraries--->rt.jar---->Source attachment,点击Edit;
3. Apply,确定。