编译时出现致命错误:tools.jar 未找到: [英] Fatal error compiling: tools.jar not found:
问题描述
在 Eclipse 中编译项目时,出现以下错误:
When compiling a project in Eclipse, I get below error:
编译致命错误:找不到tools.jar:
Fatal error compiling: tools.jar not found:
这是怎么引起的,我该如何解决?
How is this caused and how can I solve it?
推荐答案
Goto Windows -> Preferences
Java -> 已安装的 JRE -> 执行环境
JavaSE1.x -> JDE 1.x
如果你在Installed JRE
中没有JDK
,那么
If you don’t have the JDK
in the Installed JRE
, then
选择Installed JRE
并添加JDK
安装路径
Select the Installed JRE
and Add the JDK
installed path
让我们尝试将您的运行配置配置为全新安装
Let's try to configure your run configurations to clean install
点击黑色小箭头,然后点击运行配置
Click on the small black arrow and then Run Configurations
之后,您只需在 Maven 目标中进行全新安装,如下所示:
After, you just put clean install in your Maven goal, like this :
然后,尝试运行您的编译,我们将看到会发生什么... :)
And then, try to run your compilation, and we will see what happens... :)
这篇关于编译时出现致命错误:tools.jar 未找到:的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!