1.打开eclipse安装目录,显示eclipse.app包内容
2.修改Contents/info.plist 文件,增加内容:
LSEnvironment
<dict>
<key>JAVA_TOOL_OPTIONS</key>
<string>-Dfile.encoding=UTF-8</string>
<key>LANG</key>
<string>zh_CN.UTF-8</string>
</dict>
//此处是默认文件的开始,加上面一段xml即可。
CFBundleExecutable
eclipse
3.修改Contents/MacOS/eclipse.ini文件
在末尾加上 -Dfile.encoding=UTF-8
重启eclipse即可(此处作者已经ok,没有执行第4步)。
4.如果没有生效执行/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -v -f /Applications/eclipse/eclipse.app
本文介绍如何在Eclipse中设置UTF-8编码,包括修改info.plist文件和eclipse.ini文件的方法,确保Eclipse能够正确地显示和处理中文。
8615

被折叠的 条评论
为什么被折叠?



