`

Eclipse编码设置(UTF-8)

 
阅读更多
1.配置workspace的编码格式:windows->Preferences->general->Workspace,右侧Text file encoding,选择Other,改变为GBK;
2.配置工程的编码格式:Project->Preferences->Resource->Text file encoding;
3.配置java文件的编码格式:windows->Preferences->general->ContentTypes->Java Source File->UTF-8 ==Update;
4. 做RCP应用的Product输出时、或者插件输出时,则总是出错,要么不能编译通过(输出时要重新compile)、要么输出的插件运行时中文显示乱 码。此时需要再RCP应用、或插件Plugin工程的 build.properties中增加一行,javacDefaultEncoding.. = UTF-8。让输出时编译知道java源文件时UTF-8编码。这个设置需要保证所有的java源文件时UTF-8编码格式,如果不全是,可以参考 Eclipse帮中(Plug-in Development Environment Guide > Reference > Feature and Plug-in Build configuration),建议全部java源文件是UTF-8编码。




1.在eclipse.ini的-vmargs下面加上「-Dfile.encoding=UTF-8」。

2.eclipse-->Window-->Preferences-->General-->Workspace-->Text file encoding-->UTF-8

3.Installed JREs-->Default VM Arguments:-->-Dfile.encoding=UTF-8

4.eclipse-->Run-->Run Configurations-->Arguments-->VM arguments-->-Dfile.encoding=UTF-8

5.eclipse-->Run-->Run Configuration-->Common --> Console Encoding-->Others-->UTF-8

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics