Java project upgrade from 1.6 to 1.8 problems encountered (Eclipse does not support jdk1.8 and Tomcat8.0) __java Foundation

Source: Internet
Author: User
Tags apache tomcat

has been using Tomcat6.0 and jdk1.6, now the project to upgrade with jdk1.8 and Tomcat8.0, suddenly found that my eclipse does not support such a high version, only to jdk1.7 and Tomcat7.0,

So the Internet check, need to install plug-ins;

To install Tomcat8.0 plug-in steps:

Step One: Eclipse menu Help->eclipse Marketplace Click Open after the interface is as follows:


Step two: In the Find search box input: Eclipse JST Server adapters, point go Search, the normal search is the first, as shown:



The third step: the lower right corner of the install installation, my side has been installed, so the display is uninstall uninstall, follow the prompts step, step-by-step installation, and then restart according to the prompts, will find Apache Tomcat v8.0 already have, you can configure the use of 8.0+ Version of Tomcat.



Attention:

Error when installing tomcat8.5 in eclipse:

[HTML] view plain Copy the Apache Tomcat installation at this directory is version 8.5.6. A Tomcat 8.0 installation is expected.

Solution:
In Windows

[HTML] view Plain Copy① finds the Lib directory in the Tomcat installation directory and finds Catalina.jar.   Use compression software (winrar or good pressure) to open it. ② find and double hit open org\apache\catalina\util\serverinfo.properties file [HTML] view plain copy server.info=apache Tomcat /8.5.6 server.number=8.5.6.0 server.built=oct 6 2016 20:15:31 UTC

To

[HTML] view plain copy #Apache tomcat/8.5.6 server.info=apache tomcat/8.0.0 #8.5.6.0 server.number=8.0.0 To install the JDK8 plug-in server.built=oct 6 2016 20:15:31 UTC:

Step One: Eclipse menu help-> Eclipse marketplace-> Search (two plugins need to be installed here)

1 Java 8 support for Eclipsekepler SR2--JAVA8 compilation required,

2) Java 8 Facet for Web Tools foreclipse Kepler SR2--java8 operation required

Part II: Configuration of each parameter

1 System Configuration JAVA8 Compilation environment, window-> Preferences

2 Project using Java8 's compile path, project-> Java build path-> libraries-> Edit

3 The corresponding Java compiler path corresponds to version 1.8

4) Configure the project facets corresponding JAVA8

Open Eclipse Discovery before the project has a red fork: The project BuildPath changed and the operating environment has been changed to find the servlet appears: the import Javax.servlet cannot be resolved error:

The workaround is: in Eclipse, right-click the project, select Build path->configure build Path->libraries->add External JARs, and find the decompression path for Tomcat in your computer. Select "Servlet-api.jar" under the Lib folder, add click "OK"

Here we're done. Small Red Fork, the project also upgraded successfully.

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.