1. Modify the default encoding of text files in Eclipse: windows->Preferences->general->Workspace->Text file encoding is set to UTF-8
2. Modify the default encoding of the JAVA source file: windows->Preferences->general->Content Types->Context Types tree on the right, click on Text, select Java Source File, and enter UTF-8 in the Default encoding input box below , click Update
3. Modify the default encoding of the JAVA source file: windows->Preferences->general->Content Types->Context Types tree on the right, select Java Class File, enter UTF-8 in the Default encoding input box below, and click Update
4. Restart to take effect