我用的是eclipse 2022-06 (4.24.0)版本,它的默认编码方式为(UTF-8),将他改为GBK即可。具体方法:
Run->Run Configurations->Common,选中other,输入GBK即可