Problems with Jave eclipse Development

Source: Internet
Author: User

1) override problem

When I learned how to use Maven to manage projects, I tried to change an existing thrift project to a Maven project. As a result, after the dependency library is added, the code automatically generated by Thrift suddenly reported more than one hundred errors, in addition, all the errors were caused by override. At first, I thought it was a problem caused by the dependency Library added by Maven (because I just learned Maven). As a result, I had to go over the dependent library for a long time and failed to solve the problem. Later, I tried to search Baidu (thrift error: Must overwrite the superclass) and found that this was not a thrift problem, but a jdk1.5 issue. The blog on the Internet was written like this:

@ Override is already available in JDK 5, but there is a small bug, that is, it does not support the implementation of the interface. I think this is not override, and JDK 6 corrected this bug, you can add @ override to both the method override of the parent class and the implementation of the interface.

The suggestion in this article is to modify the Java compile settings of the project. Before modification:

After modification:

Solve the problem.

2) jar package reference conflict

This problem also occurs when thrift is used. When I tried to merge thrift interface code into the mapred task code, thrift interface code also reported hundreds of errors. After careful locating, A jar package reference conflict is found.

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.