eclipse菜单栏--window--preferences--General--content type-(右边窗口)Text--选中java source file;在最下面default encoding 填上你之前的编码(一般是GB1232,GBK,UTF-8)-点击update,在点ok;一定要点update,否则没用