1、点击Eclipse菜单栏 “Window”,选中 “Preferences”
2、进入 General-Content Types 下
3、选中你要修改默认编码的文件类型,在 Default encoding 这一栏改成UTF-8