Eclipse usage FAQ

1. When the Eclipse compilation is always stuck :
http://blog.csdn.net/u010419967/article/details/25819197


2. The solution to the Java @override error
 
Sometimes the Java Eclipse project is always compiled after changing to a computer @override reports an error, just remove @override, but it cannot fundamentally solve the problem, because sometimes there are too many places with @override.

This is a jdk problem. @Override is already available in JDK5, but the implementation of the interface is not supported. It is considered that this is not Override and an error is reported. JDK6 fixes this bug, and @Override can be added to both the method override of the parent class and the implementation of the interface.

To solve this problem, first make sure that jdk 1.6 is installed on the machine.

Then, select the eclipse menu Windows->Preferences-->java->Compiler-->compiler compliance level to select 1.6, refresh the project, and recompile.

If the problem has not been solved, right-click on the project where the error is reported, select Properties-->Java Compiler-->compiler compliance level, select 1.6, refresh the project, and recompile.

Best practice: 3 places about ECLIPSE version settings are set to 1.6 or 1.7

3. Problem 1: The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path

Solution: Reference: http://jingyan.baidu.com/article/f79b7cb34f40569144023ef9.html
 

4. Problem 2: Target runtime Apache Tomcat v7.0 is not defined

Find the project folder/.settings/org.eclipse in the workbench directory .wst.common.project.facet.core.xml, delete <runtime name="Apache Tomcat v7.0"/>, and save it to solve the problem.

 

5. After modifying the code, the code does not need to be automatically changed to deployment, it always needs to be manually project-cleaned

Scheme: project-buildAutomatically

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326354096&siteId=291194637