When starting a new Java project, it is best to set the entire environment to UTF-8
It is usually set in the following steps:
1: Set the encoding format for the workspace: Text file Encoding, Workspace, General, Windows, Preferences, Window
2: Settings file format is Utf-8:window, Preferences, General and Content Types
2.1: Set the default encoding:utf-8 of text
2.2 Expand the text node, and the default encoding for the Java Source and JSP nodes is also set to: Utf-8
3: Set JSP Files----Encoding Preferences, Web---Utf-8:window
3.1 Set to: Iso_10646/unicode (UTF-8)
4: After the above 3 steps, the new Java file is UTF-8 encoding, Eclipse compile, run, Debug no problem, but do the RCP application product output, or plug-in output, always error, or can not compile through (the output to re-compile), Or the output of the plug-in runtime Chinese display garbled. At this time need to re-rcp application, or plug-in plugin project Build.properties add a line, javacdefaultencoding. = UTF-8. Let the output compile when you know the Java source file UTF-8 encoded. This setting needs to ensure that all Java source files are UTF-8 encoded, and if not all, refer to the Eclipse Help (Plug-in development environment Guide > Reference > Feature and Plug-in Build configuration), it is recommended that all Java source files are UTF-8 encoded.
Eclipse fully set UTF-8 environment