@Override annotations compiling errors in eclipse

Source: Internet
Author: User

After importing a new project, find that the default JRE is version 1.5, right-click the project selection build in Eclipse path-> Click Configure Build Path->java build path-> Click JRE System After the library click on the edit->jdk1.8 version, click Finish, click OK.

But there is a Java file in the project that has a red fork, prompting to remove the override annotation. This problem is jdk1.5 version only, 1.6 version above has been resolved. In Eclipse, right-click the project selection build path->configure build path-> Click Java compiler-> Click Compiler Compliance level change from 1.5 to 1.8-> Click OK, click Yes in the Confirmation box that pops up, and the Red fork disappears.

It is important to note that the build path sets the JDK runtime environment and compiler sets the JDK compile-time environment, so they are best aligned.

  

@Override annotations compiling errors in eclipse

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.