Home  >  Article  >  Java  >  Solutions to garbled characters in java files

Solutions to garbled characters in java files

尚
Original
2019-12-09 11:30:094470browse

Solutions to garbled characters in java files

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".

Solutions to garbled characters in java files

Select the top “Resource” in the pop-up window.

Solutions to garbled characters in java files

Then select the "UTF-8" option in "Other" on the right.

Solutions to garbled characters in java files

#After completing the settings, we found that the Chinese in the code would no longer be garbled.

Solutions to garbled characters in java files

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:How to decompile javaNext article:How to decompile java