1、改动eclipse.app/Contents/Info.plist。查找
<key>CFBundleExecutable<key>
在其上方加入下面代码
<? xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>LSEnvironment</key> <dict> <key>JAVA_TOOL_OPTIONS</key> <string>-Dfile.encoding=UTF-8</string> <key>LANG</key> <string>zh_CN.UTF-8</string> </dict> <key>CFBundleExecutable<key>
2、改动eclipse.app/Contents/MacOS/eclipse.ini,在最后一行加入 -Dfile.encoding=UTF-8
3、关闭eclipse,又一次启动,并退出
4、打开命令终端,运行例如以下命令
/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -v -f /Applications/eclipse/eclipse.app
5 又一次启动Eclipse
时间: 2024-10-28 21:15:54