都是自己遇到过的问题,解决办法一半以上是从网上找到的,自己整理了一下。

导入项目后报error:java compiler level does not match the version of the installed java project
右键项目“Properties”,在弹出的“Properties”窗口左侧,单击“Project Facets”,打开“Project Facets”页面。在页面中的“Java”下拉列表中,选择相应版本

Eclipse 修改项目名称
1:修改项目目录下:.project文件 
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>GZELearning</name>
2:项目右键属性 --> Web Project Settings --> Context root
(整理者,我的改这个就行)
3:修改项目目录下:.settings\org.eclipse.wst.common.component

eclipse中is missing required source folder问题的解决
在本机的开发环境中,eclipse.project文件可能存在对缺失文件夹的引用,但是project中已经没有了该文件夹,导致编译的时候找不到该文件夹。
解决方法:
选中project-->右键-->properties--->java build path-->Source,把缺少的文件夹remove掉,重新编译就ok了

解决Eclipse中Java工程间循环引用而报错的问题 
循环引用通常发生再如下两种情况下:
(1)如果我们的项目包含多个工程(project),而它们之间又是循环引用的关系;
(2)使用maven进行项目构建时,两个module之间存在相互依赖;
那么Eclipse在编译时会抛出如下一个错误信息:
A cycle was detected in the build path of project: XXX
解决方法:
Eclipse Menu -> Window -> Preferences… -> Java -> Compiler -> Building -> Building path problems -> Circular dependencies -> 将Error改成Warning
不过这种方法治标不治本,更好的解决方法是去掉项目间的重复引用。

tomcat7在eclipse中,调试时断点频繁停在threadpoolexecutor
Typically, the debugger in Eclipse is configured to suspend execution at the location where the exception was thrown, on all uncaught exceptions. Note that the exception might be handled later, lower down in the stack frame and might not lead to the thread being terminated. This would be cause of the behavior observed.
eclipse在默认情况下勾选了“Suspend execution on uncaught exceptions”,暂停执行未捕获的异常。因此eclipse会把所有未捕获的异常先在ThreadPoolExecutor这个类中暂停。
解决方法:Preferences->Java->Debug,去掉"Suspend
execution on uncaught exceptions"

当启动tomcat时候出现 Server Tomcat v6.0 Server at localhost was unable to start within 45 seconds. If the server requires more time, try increasing the timeout in the server editor. 的错误,那表示你的tomcat启动超时了,有时候你重新启动下就好了,但有时需要重新启动很多次,如果你不想这样的话,你只需修改下tomcat的启动 时间就行了,步骤如下:
修改 workspace\.metadata\.plugins\org.eclipse.wst.server.core\servers.xml文件。
<servers>
<server hostname="localhost" id="JBoss v5.0 at localhost" name="JBoss v5.0 at localhost" runtime-id="JBoss v5.0" server-type="org.eclipse.jst.server.generic.jboss5" server-type-id="org.eclipse.jst.server.generic.jboss5" start-timeout="1000" stop- timeout="15" timestamp="0">
<map jndiPort="1099" key="generic_server_instance_properties" port="8090" serverAddress="127.0.0.1" serverConfig="default"/>
</server>
</servers>
把 start-timeout="45" 改为 start-timeout="1000" 或者更长 重启eclipse就可以了。

启动tomcat插件报WEB-INF\class does not exist or is not a readable directory
实际是之前别的插件在Tomcat的Server.xml里留了痕迹
这次是多了一行:
<Context path="" reloadable="true" docBase="D:\eclipse\kepler_workspace\mpa\webapp\WEB-INF\class" workDir="D:\eclipse\kepler_workspace\mpa\work" />

项目报Cannot change version of project facet Dynamic web module to 2.5
(可能管用)
右键项目,Project Facets里面修改Dynamic web module为2.5,这样可能不行,就要修改配置文件
1.把Servlet改成2.5,修改项目的web.xml
<?xml version="1.0" encoding="UTF-8"?>  
<web-app version="2.5"  
    xmlns="http://java.sun.com/xml/ns/javaee"  
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"  
    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee  
    http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">  
  <display-name>Archetype Created Web Application</display-name>  
</web-app>

2.修改项目的设置,在Navigator下打开项目.settings目录下的
org.eclipse.jdt.core.prefs   把1.5改成1.6
org.eclipse.wst.common.component   把project-version="1.5.0"改成project-version="1.6.0"
打开org.eclipse.wst.common.project.facet.core.xml  把<installed facet="java" version="1.5"/>改成<installed facet="java" version="1.6"/>,把  <installed facet="jst.web" version="2.3"/>改成  <installed facet="jst.web" version="2.5"/>

运行Applet后窗口中文是乱码
在对应文件的 run configurations - Arguments - VM arguments 中增加
-Dfile.encoding=GB18030

包冲突,调用NodeList.item(0).getTextContent()时报没有找到对应方法
实际是 jdk中有 org.w3c.dom.NodeList, xml-apis包中也有org.w3c.dom.NodeList,
系统默认加载xml-apis,但是低版本的xml-apis没有 getTextContent() 方法
解决:可以在eclipse中 项目右键 -> Properties -> Java Build Path -> Order and Export 中
选择把jdk移动到最上,表示先加载jdk

Eclipse启动时报错 An internal error has occurred. java.lang.NullPointerException
解决方案:删除工作空间下的.metadata\.plugins\org.eclipse.core.runtime\.settings\com.genuitec.eclipse.ast.deploy.core.prefs。
重新打开Eclipse
ps:web项目需要重新部署

导出项目为一个jar包时报 No resources selected JAR creation failed. See details for additional information. No resources selected
原因,项目重命名过,导致 Launch configuration 选项使用的main方法对应的class不存在了
解决:指定对应项目的运行类

Eclipse无法启动报
An internal error occurred during: "reload maven project". java.lang.NullPointerException

报错原因:在工作引入了maven项目,启动时加载太慢(下载jar包),然后将其关闭,eclipse也关闭。由于没有正常关闭导致eclipse无法将数据正常写入配置文件导致无法启动。
错误形式:An internal error occurred during: "reload maven project". java.lang.NullPointerExceptio
解决办法:
  第一种方法:在Eclipse工作区间内找.metadata并直接删除,此时便可以正常打开。(此方法不推荐,因失去一些配置信息并且还要手动导入项目,损失较大)
  第一种方法:在Eclipse工作区间内找.metadata——>.plugins——>org.eclipse.e4.workbench——>workbench.xmi直接删除(不用手动导入原来项目,但失去配置信息,损失相对第一种方法来说,相对较小)
  第三种方法:在Eclipse工作区间内找.metadata——>.plugins——>org.eclipse.e4.workbench——>workbench.xmi并用编译工具打开,删除sharedElements配置项(eclipse加载界面配置文件workbench.xmi中的sharedElements配置项找不到相应的文件导致的异常。比前两种方法,损失最小,不过有时也可能是persistedState标签项造成的,此时要求使用者要对Eclipse软件及各种配置相当熟悉)
--整理者:我修改workbench.xmi时没有备份,就删掉了,重启后暂时没发现什么问题

关于 the'org.eclipse.recommenders.completion.rcp'plug-inor disable the'Java Proposa......问题
表现是使用提示快捷键补全类名时会卡住,然后报错.提示信息说要disable Java -> Editor -> Content Assist -> Advanced 的选项Java Proposals(Code Recommenders) 
解决办法是禁用 Java Proposals(Code Recommenders),选中 Java Proposals 和 Java Proposals(Task-Focused)

--但是还是哪里有问题

使用sts创建springcloud项目后pom.xml报Unknow
解决:
在<properties>标签中增加<maven-jar-plugin.version>3.1.1</maven-jar-plugin.version>
然后再 update project 一下
据说是 springboot2.1.5.RELEASE 升级maven的版本到3.1.2,而当前ide不支持那么高,
其实就是要降低maven-jar-plugin的版本

启动时报An internal error occurred during: "Initializing Java Tooling".
1.可以选择重置窗口布局
windows -> perspective -> reset perspective 
2.可以选择删除工作空间的/.metadata/.plugins/org.eclipse.core.resources/.project
但是会使项目配置(如svn版本)丢失

导入项目后报Access restriction: The type 'BASE64Decoder' is not API(restriction on required library 'jdk路径\jre\lib\rt.jar)
一种做法是删除项目的JRE System Library再重新添加就好了

尝试向tomcat服务中添加项目报there are no resources that can be added or removed from the server
或 Setting property 'source' to 'org.eclipse.jst.jee.server:xx' did not find a matching property

1.查看项目属性,properties -> Project Facets -> Dynamic Web Module
可能没有被勾选
2.还有可能是eclipse不知道webapp目录在哪里,使用myeclipse添加项目,程序会主动提示设置这个目录,或者直接在项目的 properties -> Deployment Assembly 里面设置
3.如果没有指定Deployment Assembly,则eclipse可能会自动生成一个WebContent文件夹

启动项目报ClassFormatException: Invalid byte tag in constant pool: 60
大体是jar包版本问题,我这个是提示
Unable to process Jar entry [com/ibm/icu/impl/data/LocaleElements_zh__PINYIN.class] from Jar [jar:file:/D:/Tools/Apache/apache-tomcat-7.0.65win64/webapps/zkweb_scan/WEB-INF/lib/icu4j.jar!/] for annotations

debug时不走断点
和快捷键 Ctrl+Alt+B 有关
有一个选项,菜单 run -> Skip All Breakpoints

异常关机导致workspace内项目丢失
大体是,电脑断电了,再次打开sts,左侧的Package Explorer里没有东西了
解决:选择 文件 -> Open Projects from File System, 在 Directory里选择指定workspace,会出现导入所有项目的列表.
但是这样的话,之前设置的 working sets 虽然还在,里面是没有项目的,需要手动导入

使用sts 4.4.2版本使用Alt+/报错
新装的4.4.2版本,创建项目时使用提示快捷键,可以出现提示,但是第一行显示 Error while computing completion
查看sts的在工作空间下的日志 /.metadata/.log
会发现每一次提示都会报错
!MESSAGE org.eclipse.lsp4j.jsonrpc.ResponseErrorException: Internal error.
java.util.concurrent.ExecutionException: org.eclipse.lsp4j.jsonrpc.ResponseErrorException: Internal error.
Caused by: org.eclipse.lsp4j.jsonrpc.ResponseErrorException: Internal error.
重启之后正常了

使用eclipse及sts遇到的问题相关推荐

  1. Eclipse安装STS插件并解决安装缓慢问题

    原 Eclipse安装STS插件并解决安装缓慢问题 2018年11月20日 10:22:29 MyronCham 阅读数 1198 标签: sts 更多 个人分类: 开发工具 Eclipse安装spr ...

  2. Eclipse安装STS插件

    Eclipse安装STS插件 1.下载STS插件 地址:https://spring.io/tools/sts/all/ 最上面是已经安装好STS插件的Eclipse软件,可以点击上图红框中的&quo ...

  3. Eclipse安装STS

    说明:本文为作者原创,亲测可用.欢迎大家转载,不过记得声明出处哦~ 前言 说明: STS即Spring Tool Suite (STS) for Eclipse,是一个基于Eclipse IDE开发环 ...

  4. eclipse 或 sts 常用设置

    记录eclipse 或 sts 编辑器常用设置,方便使用时快速查找 目录 1.修改工作区(Workspace)编码格式 2.修改字体大小 3.设置自动导包 4.修改控制台打印行数 1.修改工作区(Wo ...

  5. eclipse 或 sts 安装 antlr 插件

    eclipse 安装 antlr 插件,笔者这里使用 sts 安装 antlr 插件,需要一些时间 1.下载 antlr 插件 下载地址:https://github.com/antlr4ide/an ...

  6. Eclipse(STS 4)闪退导致EGit插件异常

    引言 到目前为止,STS已经闪退过三次了. 问题很棘手,我需要冷静. 首先出现了一个问题就是,EGit无法commit. 第二个问题是切换分支报错. 闪退重启后EGit无法提交代码 观察闪退出现的时机 ...

  7. eclipse安装STS支持注意的坑

    1.根据eclipse版本下载对应的STS压缩包: 查看版本:Help->About Eclipse 2.https://spring.io/tools/sts/all下载对应的STS: 3.S ...

  8. Gradle下载安装与和eclipse(STS)集成

    前言 简单的说,Gradle是一个构建工具,在java中功能大体上使用同maven一样,就是使用方式不同...吧啦吧啦... 1 Gradle下载 点击下载各个版本的Gradle 一般下载all版本, ...

  9. eclipse安装STS插件失败

    使用Eclipse Neon安装Spring Tool Suite报错: 安装STS插件时,停止到49%总会报错,无论重复安装多少次,都是同样的步骤. Cannot complete the inst ...

  10. eclipse 下载sts插件及离线安装教程

    eclipse sts插件 jar包下载: spring-tool-suite-4-4.8.0.RELEASE-e4.17.0-win32.win32.x86_64.self-extracting.j ...

最新文章

  1. 干货整理!10个Python图像处理工具,入门必看,提效大法
  2. [转]WinXP、Win7脚本自动加域及用户资料迁移
  3. 【FPGA】单端口RAM的设计(异步读、同步写)
  4. 没想到,因为这场AI大会,我也可以凡尔赛一把
  5. 1、SQL是什么?它能做什么?
  6. ccaf internship
  7. 机器视觉对印刷业的影响
  8. (standard input): No keywords in input file
  9. PTA 7-2 统计素数并求和
  10. F28335的SCI模块
  11. On Robust Capon Beamforming and Diagonal Loading
  12. 千兆路由器怎么设置网速最快_如何设置路由器使网速最快
  13. CSS多列等高如何实现?
  14. 输出1234无重复三位数
  15. 洛谷 P4246 [SHOI2008]堵塞的交通 线段树
  16. 做好软件测试的关键是什么,做好测试计划和测试用例的工作的关键是什么?
  17. 古风排版(20 分)
  18. 【华人学者风采】汪萌 合肥工业大学
  19. 房子装修与软件开发竟是如此的相识
  20. 基于DS18B20温度检测

热门文章

  1. 自学方法|明确学习的出发点【可能的阶梯】
  2. Error:java:JDK isn‘t specified for module
  3. 那些让清英受益终生的书
  4. 最小二乘法拟合非线性函数及其Matlab/Excel 实现
  5. 无法对计算机进行搜索,电脑搜索功能不能使用解决办法
  6. 【算法题目】DFS BFS 动态规划 零钱兑换 Python
  7. 计算机网络复习总结:什么是OSI7层模型、5层模型、TCP/IP 4层模型,各层协议导航
  8. mysql 匹配_MySQL(筛选、排序、匹配)
  9. Apollo安装部署
  10. 微信小程序商机_微信小程序提供的创业商机有哪些