During the process of java development, due to encoding problems, I opened the project and found that the Chinese characters inside were all garbled. In this case, we can set the corresponding encoding display in eclipse, or change the Just convert all java files to supported encoding.
Solution:
First we can open the tool menu "Project"--"Properties".
Select the top “Resource” in the pop-up window.
Then select the "UTF-8" option in "Other" on the right.
#After completing the settings, we found that the Chinese in the code would no longer be garbled.
For more java knowledge, please pay attention to the java basic tutorial column.
The above is the detailed content of Solutions to garbled characters in java files. For more information, please follow other related articles on the PHP Chinese website!