content
- foreword
- Problem Description:
- try
-
- 1. Configure startup parameters (unresolved)
- 2.[Modify IDEA configuration](https://zhuanlan.zhihu.com/p/103850463), idea64.exe.vmoptions (unresolved)
- 3. [Modify Tomcat configuration](https://www.cnblogs.com/lixin-link/p/11177967.html) (unresolved)
- 4. [Configure IDEA FileEncoding](https://www.cnblogs.com/yanglichen/p/11435628.html) (unresolved)
- 5. [Configure JAVA_TOOL_OPTION](https://jingyan.baidu.com/article/1709ad802ea57b4634c4f0ff.html) (unresolved)
- 6. Modify VmOption by setting (**solve**)
- Summarize
foreword
This blog records how to solve the problem of garbled output of the tomcat console in the win system idea configuration. I will list all the attempts. Friends who have the same problem can learn from it. My own solution is method 6. It is recommended to try it first.
environment
System: windows 7
IDEA: 2020.1
Tomcat: 7.0.96
Problem Description:
After IDEA configures Tomcat, start the output in the IDEA console, the Chinese is garbled
try
1. Configure startup parameters (unresolved)
-Dfile.encoding=UTF-8
2. Modify IDEA configuration , idea64.exe.vmoptions (unresolved)
安装目录JetBrainsIntelliJ IDEA 2019.2.2inidea64.exe.vmoptions
with 安装目录JetBrainsIntelliJ IDEA 2019.2.2inidea.exe.vmoptions
adding a line
-Dfile.encoding=UTF-8
Also configure method 1
3. Modify Tomcat configuration (unresolved)
Tomcat installation directory ...apache-tomcat-8.5.57conflogging.properties
, change all UTF-8 to GBK, save and restart
4. Configure IDEA FileEncoding (unresolved)
From File->Setting, set File Encodings, check if Default Encodings is UTF-8
5. Configure JAVA_TOOL_OPTION (unresolved)
Name: JAVA_TOOL_OPTION
Value: -Dfile.encoding=UTF-8
Methods 1, 2, 4 are also configured
6. Modify VmOption by setting ( solve )
This is different from method 2, this is to modify the parameters through the method provided by the program, the final test is valid
Help->Edit Custom VM Options...
, add a line-Dfile.encoding=UTF-8
I have also configured method 4 here, because I think the unified encoding format is good, so I did not restore the configuration. If configuring method 6 alone does not take effect, you can try configuring method 4
Summarize
First attach the solution renderings (cry with joy)
Through the last successful method analysis, the modified configuration file is actually the configuration file in the AppData directory