Eclispe cannot run Java Web programs-Prompt: Project facet Java version 1.7 is not supported

Source: Internet
Author: User

Reinstall eclispe, reconfigure tomcat, and configure tomcat in eclispe. Configuration is successful and the configuration is verified.

Create a Java Web program and test it.

In eclispe, create a Java Web program. The result is as follows:

Please pay attention to the red dot on the program. Why is there an extra red dot for no reason? Now I just want to create a new program. I haven't added any files or code yet. I still haven't reported any errors when I look at it as a whole. Because the original web program is as follows:

There is no red dot. What is going on. After eclispe is reinstalled, The Hibernate tools plug-in is installed. Is it because of plug-ins? Confused. Then continue the test. When the web program is running, the following error occurs:

Tomcat 7 was installed and JDK 1.6 was installed.

The tomcat configuration is as follows:

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

Check tomcat installation and environment configuration multiple times. If no problem occurs, lock the target to the installation. In tomcat configuration, select your own installation when you select JRE, instead of the default one. This is normal, but when you click installed jres, the result is as follows:

This is the true cause of the problem. The installed JRE is 1.6. But what is 1.7? How did 1.7 come out?

After a review, I finally learned the source of 1.7. This problem is also solved. The solution is as follows:

Window-preferences-Java-compiler: the shadow of 1.7 is finally displayed. Here, change to your own JDK version. If my account is 1.6, change it to 1.6.

Generally, the changes do not take effect immediately. You need to restart eclispe. The Web application icon resumes its original appearance and runs normally. OK. Everything is done. Continue Learning ~

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.