First, find the installation directory of IntelliJ IDEA, enter the bin directory, and locate the idea.vmoptions file, as shown in the figure below:
Double-click to open the idea.vmoptions file, as shown in the figure below:
Then, append -Dfile.encoding=UTF-8 code to it, as shown in the following figure:
Finally, in "Run/Debug Configurations" in IntelliJ IDEA, modify the virtual machine parameter "VM options" and the content is the same as the content added in the file idea.vmoptions , both of which are -Dfile.encoding=UTF-8 , as shown in the figure below:
At this point, the problem of outputting Chinese garbled code on the IntelliJ IDEA console has been solved!
Summarize
The above is the problem of solving the problem of garbled Chinese output on the IntelliJ IDEA console introduced by the editor. I hope it will be helpful to everyone. If you have any questions, please leave me a message and the editor will reply to everyone in time. Thank you very much for your support to Wulin.com website!