Solution:
1. Find in the menu bar above: Window --> Preferences
##2. Next, expand in order: General --> Workspace. You can see that the default encoding is GBK format 3. If you want to support Chinese, you need utf -8 encoding format. So here we change the encoding to utf-8, click: Other, select "UTF-8", and then click "Apply and Close" 4. You can see it at this time The Chinese language has been displayed normally, and it can also run successfully Recommended tutorial:The above is the detailed content of How to solve garbled code in java eclipse. For more information, please follow other related articles on the PHP Chinese website!