转:eclipse控制台乱码

转自: http://eggboss.iteye.com/blog/639841

 

本身不会乱码的,但是在eclipse.ini文件后加了 -Dfile.encoding=UTF-8 参数后console就乱码了,好吧,google吧...

其实我的乱码主要是myeclipse的server在启动时控制台乱码,没法通过Run Configurations..、Debug Configuration... 之类的去配置(如果为server创建一个启动配置的话,则无法断点调试)。所以按下面的步骤走吧...

下面的第三步应该是最重要的...,如果只是配myeclipse的server控制台的乱码,第三步以后的可以不用管。

 

建置全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

==>亂碼!

5.eclipse-->Run-->Run Configuration-->Common 頁籤--> Console Encoding-->Others-->big5

==>ok!

猜你喜欢

转载自wls981.iteye.com/blog/1694006