简体   繁体   English

eclipse错误存在于必需的项目中,但编辑器没有显示错误

[英]eclipse errors exist in required projects but editor shows no errors

I use eclipse to code in java. 我使用eclipse来编写java代码。 My code was running perfectly fine. 我的代码运行得很好。 Finally, i deleted some files which were not needed from my drive. 最后,我删除了一些我的驱动器不需要的文件。

Right now, I have the source file and the compiled .class files in the correct folders. 现在,我将源文件和已编译的.class文件放在正确的文件夹中。 Also, although I initially had multiple .java files, I am 100% sure that the one I need is there and also that it doesn't need anything from any other thing. 此外,虽然我最初有多个.java文件,但我100%确定我需要的那个,并且它不需要任何其他任何东西。 All the imports (i import only from standard libraries) are showing no error. 所有导入(我只从标准库导入)都没有显示错误。

The problem is that when i make any changes in my .java file, and save it, it does get saved but when I execute the code, it runs just like the old version, ie the changes are not reflected in the output. 问题是,当我在.java文件中进行任何更改并保存它时,它会被保存,但是当我执行代码时,它就像旧版本一样运行,即更改不会反映在输出中。 Also, on clicking 'run', eclipse gives a warning that 'errors exist in required projects' although the editor shows none. 此外,在点击“运行”时,eclipse会发出警告,即“所需项目中存在错误”,尽管编辑器没有显示。

Whats going wrong ? 什么出错了? Please help. 请帮忙。

Okay got it....I had added some external jars to my project. 好的....我在我的项目中添加了一些外部罐子。 Later, when I realised that they were not needed anymore, i deleted them from my hard disk. 后来,当我意识到不再需要它们时,我将它们从我的硬盘中删除了。 However, the build path contained their names too among the other libraries (and displayed "missing" after that). 但是,构建路径在其他库中也包含它们的名称(之后显示为“缺失”)。 I removed them and its working fine. 我删除了它们并且工作正常。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM