Intellij Idea乱码解决方案都在这里了
生活随笔
收集整理的這篇文章主要介紹了
Intellij Idea乱码解决方案都在这里了
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
轉載自?Intellij Idea亂碼解決方案都在這里了
亂碼場景
使用Intellij Idea經常遇到亂碼問題,可以總結為以下幾類亂碼的場景。
1、工程代碼亂碼。
2、main方法運行,控制臺亂碼。
3、tomcat運行,控制臺亂碼。
解決方案
1、工程代碼亂碼
Settings > Editor > File Encodings > Global Encodings & Project Encodings 設置為: UTF-8。
2、main方法運行,控制臺亂碼
Settings > Build, Execution, Deployment > Compile > Java Compiler > Additional command line parameters > 設置為:-encoding utf-8。
3、tomcat運行,控制臺亂碼
Edit Configurations > Tomcat Server > server > VM options > 設置為: -Dfile.encoding=UTF-8。
idea > bin > idea.exe.vmoptions或者idea64.exe.vmoptions配置文件末尾添加: -Dfile.encoding=UTF-8。
總結
以上是生活随笔為你收集整理的Intellij Idea乱码解决方案都在这里了的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 宿迁是属于哪个省市 宿迁在哪里
- 下一篇: 宿迁是哪个省的城市 宿迁在哪里