eclipse 构建过程中发生错误。在项目上运行构建器“Java Builder”时出错
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/16142737/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Errors occurred during the build. Errors running builder 'Java Builder' on project
提问by SShehab
when i'm working in eclipse juno and trying to save grails file this error occured
当我在 eclipse juno 中工作并尝试保存 grails 文件时发生此错误
Errors occurred during the build.
Errors running builder 'Java Builder' on project 'My_Project_name'.
DONT_CARE
what is this error ??
这是什么错误??
Thanks
谢谢
回答by VonnCC
Try this, goto Project tab, then properties, then click Java Build Path then Add Library, then Android Classpath Container, then select your project, then Hit Finish
试试这个,转到项目选项卡,然后属性,然后依次单击 Java 构建路径、添加库、Android 类路径容器,然后选择您的项目,然后点击完成
回答by Gaurav Sharma
The Genuine solutionfor this problem for windows OS is: BY Setting up the path variable
windows操作系统这个问题的真正解决方案是:通过设置路径变量
Easy 5 steps would be:
简单的 5 个步骤是:
STEP 0:Goto Window button and click Edit System Environment
步骤 0:转到窗口按钮并单击编辑系统环境
STEP 1:Goto Advanced>>Environment variables>>Edit PATH
步骤 1:转到高级>>环境变量>>编辑路径
STEP 2:Change path value as::
第 2 步:将路径值更改为:
**(1):** the jdk installed folder:- C:\Program Files\Java\jdk-12.0.1\bin
**(2):** copy the location of the path variable which is default i.e.: %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files\Git\cmd
**(3):** Merge both of them and paste/update into variable value as:- C:\Program Files\Java\jdk-12.0.1\bin**;**%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files\Git\cmd
STEP 3:Open cmd by:- ctrl+r
第 3步:通过以下方式打开 cmd:- ctrl+r
STEP 4:Check for the current java version that you have installed for compliance to the machine by:- java -version(if it doesn't works, try:- jshell -version)
第 4步:通过以下方式检查您安装的当前 Java 版本是否符合机器:- java -version(如果它不起作用,请尝试:- jshell -version)
STEP 5: After getting the version launch eclipse IDE and create new java project and set the location of installed jdk as: C:\Program Files\Java\jdk-11.0.2
STEP 5:获取版本后启动eclipse IDE并新建java项目,设置jdk安装位置为:C:\Program Files\Java\jdk-11.0.2
Thereafter, your java application would run efficiently.
此后,您的 Java 应用程序将高效运行。
Why this problem arises:When we install multiple jdk and runs eclipse, our machine as well as eclipse ide need the synchronization of the java version installed. So, the solution is to change the path variable on the system and set ide java version as well.
为什么会出现这个问题:当我们安装多个jdk并运行eclipse时,我们的机器以及eclipse ide都需要同步安装的java版本。因此,解决方案是更改系统上的路径变量并设置 ide java 版本。
回答by JGlass
My .02c, and @madhuka-dilhan link helped to give inspiration, this was occurring every time I saved anything. Two projects were causing it and it was super annoying, I had lived with it for about two months O_o
I was getting the following errors related to a bad Hymanson jar file or two (but they work!) so I just disabled the two builders that were causing the error. No more build errors anymore. Note, not sure if this might have undesirable effects (yet). Will update if it does!
我的 .02c 和 @madhuka-dilhan 链接有助于提供灵感,每次我保存任何东西时都会发生这种情况。有两个项目导致了它,这非常烦人,我已经使用它大约两个月了 O_o
我收到了与一个或两个错误的 Hymanson jar 文件相关的以下错误(但它们有效!)所以我只是禁用了两个构建器导致错误。不再有构建错误。请注意,不确定这是否会产生不良影响(尚)。有的话会更新!
Errors occurred during the build. Errors running builder 'JBoss Knowledge Base Builder' on project 'MSProvisioningMDBComplexOrderHandlerEJB'. Unknown tag! pos=3 poolCount = 10
Errors running builder 'CDI (Contexts and Dependency Injection) Builder' on project 'MSProvisioningMDBComplexOrderHandlerEJB'. Unknown tag! pos=3 poolCount = 10
构建过程中发生错误。在项目“MSProvisioningMDBComplexOrderHandlerEJB”上运行构建器“JBoss Knowledge Base Builder”时出错。未知标签!位置 = 3 池数 = 10
在项目“MSProvisioningMDBComplexOrderHandlerEJB”上运行构建器“CDI(上下文和依赖注入)构建器”时出错。未知标签!位置 = 3 池数 = 10
回答by bradylange
Potential Fix:
潜在的修复:
It is possible that the following files/directories were corrupted or don't pertain to your current workspace settings (importing someone else's project that has different configurations):
以下文件/目录可能已损坏或不属于您当前的工作区设置(导入具有不同配置的其他人的项目):
.classpath
.project
.settings/
.classpath
.project
.settings/
Solution:
解决方案:
- Close the project
- Close Eclipse
- Move the above files/directories outside of the project directory (don't delete them just in case this isn't the problem)
- Open Eclipse
- Open the project
- 关闭项目
- 关闭日食
- 将上述文件/目录移到项目目录之外(不要删除它们,以防这不是问题)
- 打开日食
- 打开项目
This should generate the .project
and .class
files at the least and you should no longer receive an error upon compilation. I hope this resolves your issue!
这至少应该生成.project
和.class
文件,并且您在编译时不应再收到错误。我希望这能解决您的问题!
回答by ObviousChild
I came here looking for solution. The problem in my case was that src/test/java was specified as a source dependency in build path, but the folder did not exist. NPE went away after I removed the dependency.
我来到这里寻找解决方案。我的问题是 src/test/java 被指定为构建路径中的源依赖项,但该文件夹不存在。在我删除依赖项后,NPE 消失了。
Guess it would be a good idea to check whether Build path entries are missing in any of the projects and resolve them to get rid of this error.
猜猜检查任何项目中是否缺少构建路径条目并解决它们以消除此错误是一个好主意。
回答by budo
I had the same Problem on Eclipse under Linux. When the battery of my notebook is empty, it turns off and close eclipse and all other running programs. After i boot my notebook again and starts eclipse, it shows my the message "Errors occurred during the build". After i restart eclipse the problem goes from it self and it does not show again. Maybe the hard stop of eclipse is the cause.
我在 Linux 下的 Eclipse 上遇到了同样的问题。当我的笔记本电池没电时,它会关闭并关闭 eclipse 和所有其他正在运行的程序。在我再次启动我的笔记本并启动 eclipse 后,它显示了我的消息“构建过程中发生错误”。在我重新启动 eclipse 后,问题就出自它自己,并且不再显示。也许eclipse的硬停是原因。
回答by Madhuka Dilhan
I added this question and answering on my own as I could not find an answer on Stackoverflow and it may benefit someone else
Answer is:
On your project "project", right click -> Properties>Builders Remove the missing builder Source http://www.eclipse.org/forums/index.php/t/28894/
我添加了这个问题并自己回答,因为我在 Stackoverflow 上找不到答案,这可能会让其他人受益
答案是:
在您的项目“project”上,右键单击 -> Properties>Builders 删除缺少的构建器源 http://www.eclipse.org/forums/index.php/t/28894/