选中Window -> Preferences -> Content Types -> Java Class File,单击add加入Default encoding选项,然后在这个选择内输入GBK,单击update 同理可以修改其它文件的默认编码格式。