Eclispe cannot run Java Web program-hint: Project facet Java version 1.7 is not supported

Source: Internet
Author: User
Tags java web

Reload Eclispe, reconfigure Tomcat, and configure Tomcat in Eclispe. Configuration all smooth, configuration completed inspection.

Create a new Java Web program, and then test it.

In Eclispe, create a new Java Web program with the following results:

Please pay attention to the red dots on the program. How could a red dot come out for no reason? Now just a new program only, has not added any files or code, the overall query, there is no error. Because the original web program is as follows:

No red dots. What's going on. The Hibernate tools plugin has been installed since the ECLISPE has been reinstalled. Is the reason for Plug-ins. Doubts. Then proceed to the test. When you run this Web program, you cannot run it, prompting the following error:

The tomcat installed at that time was a TOMCAT7 version and the installed JDK version was 1.6.

The configured Tomcat is as follows:

Window-preferences-server-runtime environment, add Tomcat. As follows:

Check multiple, tomcat installation, environment configuration, no problem, then the target problem locked on the installation, in the configuration tomcat, when the JRE selected, choose their own installed, not the system default. This selection is normal, but when you click Installed JREs, the results are as follows:

See this problem, it turns out that the real problem lies in this AH. The JRE installed is 1.6. But 1.7 is something. 1.7 is how to come out of it.

Then after a search, finally know the source of 1.7. It also solves the problem. The solution is as follows:

Window-preferences-java-compiler: Finally saw the shadow of 1.7. Here, change to their corresponding JDK version. Mine is 1.6, just change it to 1.6.

After the change, generally does not take effect immediately, need to restart Eclispe. The Web program icon restores its original appearance and works fine. OK, everything, get it done. Continue to study AH ~

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.