Java project export source code jar package check Chinese comments garbled in Eclipse, jareclipse

Source: Internet
Author: User

Java project export source code jar package check Chinese comments garbled in Eclipse, jareclipse
Problem scene:

Since many projects are added to the Maven main project, it is convenient to update and debug the project, but the speed of Eclipse is severely affected. Therefore, some projects are exported to jar Packages containing source code separately, uploaded to nexus for reference by other projects. However, Chinese comments are garbled during Eclipse viewing in referenced projects.


In fact, this is a problem caused by the default encoding of eclipse.

Solution: 1. Modify the default encoding of text files in Eclipse:

Windows-> Preferences-> general-> Workspace-> Text file encoding settings to UTF-8


2. Modify the default encoding of the JAVA source file:

Windows-> Preferences-> general-> Content Types-> Context Types tree on the right, click Text, select Java Source File, enter the UTF-8 in the Default encoding input box below, and click Update


3. Re-export the source code jar package and upload it to Nexus; 4. Execute Maven Update for the referenced project;

Note: If the version is not updated, you must first Delete the corresponding Jar package from the local database and then execute Maven Update.

Related Article

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.