Netbeans可能存在错误,它正在执行我更改的旧代码 [英] A possible bug with Netbeans, it's executing the old code I changed

查看:119
本文介绍了Netbeans可能存在错误,它正在执行我更改的旧代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在编写一个超过500课程的项目。其中一个类负责从磁盘中检索数据。由于某些原因,我更改了代码,但是,当我运行代码时,它会执行类的旧代码。当我调试时,调试器移动空行,这意味着它仍然运行在我已更改的旧代码上。我多次清理和构建项目。我手动删除了所有的.class文件并重新构建了项目,没有任何改变。

I have been coding in a project with over 500 class. One of the classes is responsible for retreiving data from the disk. For some reasons I changed the code, but still, when I run the code, it executes the old code of the class. When I debug, the debugger moves over empty lines which means it still runs over the old code that I have changed. I cleaned and built the project several times. I hand deleted all the .class files and built the project again and nothing changed.

让我发疯的是,我将这段代码复制粘贴到新项目中的新类中,并使用它所使用的类中的main方法对其进行测试精细。

What drives me crazy, is that I copy-paste this code to a new class in a new project and I test it using a main method within the class it works just fine.

我想这是netbeans中的一个错误,或者背后有一些我不知道的东西。我使用的版本是7.1,它是最新的。

I guess it's a bug in netbeans or there is something behind that i don't know about. The version I'm using is 7.1 and it's up to date.

如何克服这个问题?

推荐答案

由于缓存,我遇到了一些(不同的)问题。擦除它后,一切正常。

I've had some (different) issues because of the cache. Everything worked after I erased it.

在我的机器上(Windows 7),它位于: MyDirectory> .netbeans> 7.0> var>缓存

On my machine (Windows 7) it's at: MyDirectory > .netbeans > 7.0 > var > cache.

这篇关于Netbeans可能存在错误,它正在执行我更改的旧代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆