1.在項目上右鍵properties,選擇Resource,更改Text file encoding 設置(bgk或者utf-8 等...)
2.在IDE(Eclipse),選擇Window--->preferences---->General---->Workspace----找到Text file encoding 設置 編碼格式
3.(我使用的)在IDE(Eclipse),選擇Window--->preferences---->General---->Content Types-------點開text (有個+符號)---找到Java Source File ----在Default encoding 設置合適編碼格式(gbk 或者UTF-8)
1試過好用