有时候,我们可能会需要修改eclipse上debug或者run状态下的tomcat编码,例如如下图:


假如你想修改eclipse下tomcat启动的时候的编码为GBK:

eclipse 运行tomcat初始化参数 Dfile.encoding=UTF-8


此时,你可以通过如下方式修改:

1、打开eclipse的Debug Configurations:

eclipse 运行tomcat初始化参数 Dfile.encoding=UTF-8


2、选中需要的修改编码的tomcat服务器,在右侧的Common标签页的Encoding选项卡选择Other,在下拉框中选择GBK之后,点击下方的Apply。

eclipse 运行tomcat初始化参数 Dfile.encoding=UTF-8


3、重启tomcat即可看到此时的tomcat 的编码已变为GBK:

eclipse 运行tomcat初始化参数 Dfile.encoding=UTF-8

相关文章:

  • 2021-10-21
  • 2022-12-23
  • 2021-05-17
  • 2021-07-06
  • 2021-09-13
  • 2021-11-23
  • 2022-02-09
猜你喜欢
  • 2021-11-23
  • 2021-07-08
  • 2022-02-03
  • 2021-08-02
  • 2021-12-10
  • 2022-12-23
  • 2021-04-14
相关资源
相似解决方案