方法如下: 打开eclipse,点击菜单栏Window-->Preferences-->General-->Content Types -->右边对话框展开Text-->Java Properties File-->`Default encoding: UTF-8` 图解如下: