将eclipse的编码改成UTF-8,默认是GBK

第一步。在菜单栏选择“window“----preference----General-----Workspace   选中Workspace   在右边窗口中找到Text file encoding:   选择other,然后选择utf-8

第二步。在菜单栏选择“window“----preference----General-----Editors----Text Editors-----Spelling: 在右边的窗口中找到Encoding:选择other ,然后选择utf-8

 完成!

原文地址:https://www.cnblogs.com/robben/p/4466194.html