IntelliJ Idea garbled solution (project code, console, etc.)

Source: Internet
Author: User

The IDE has recently changed from eclipse to IntelliJ idea because most of the company is using the IDE, and it's always recommended, so try it fresh. For the first day, I met the IDE will encounter the garbled problem, took a lot of time to finally solve, so here to record a solution for later reference.

There are a total of the following garbled solutions:

    1. Project garbled
    2. The console is garbled when executing the main function
    3. The console is garbled when running Tomcat

PS: If the following scenario does not take effect , open the idea installation directory to find the idea.exe.vmoptions(64-bit idea64.exe.vmoptions) file, and at the end of the file, add -dfile.encoding=utf-8

Can do this first step, plus this basically a lot of is not garbled

1. Project garbled

Open file-setting, find the File encodings this option, the encoding set to your project code can be, generally UTF-8, such as (red Box place), and then rebuild again, basic on the line

2. The console is garbled when executing the main function

Also open setting, find Build,execution,deployment > Compiler > Java Compiler, set Additional command line parameters option for-enc Oding Utf-8, then rebuild down, rerun

3. The console is garbled when running Tomcat

1) Open Run/debug Configuration and choose your tomcat

2) then in Server > VM options set to-dfile.encoding=utf-8, restart Tomcat

OK, three kinds of solution garbled solution is probably the case, there are questions to leave a message

IntelliJ Idea garbled solution (project code, console, etc.)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.