A possible bug with Netbeans, it's executing the old code I changed

荒凉一梦 提交于 2019-12-06 01:31:21
toto2

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

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

yes, this kind of thing happens in eclipse too. Some times when the project is large the build may not work correctly based on the directory structure used in the project. when you say that you are cleaning and rebuilding the code, have you tried to actually go and delete the bin folder or the build folder? it you do this, i think you should not face the problem again. some times some classes which are no longer referenced might be left in the jars. It could even happen that your old class is still in the classpath from where you run the code(the jars of the old code could still be in your classpath).

Hope this helps

Yusuf Maryam

it is not really the cache problem. If you are working with netbeans :

  1. Right click on the project
  2. Navigate to properties and click it
  3. Click on the run circle(button)
  4. change the main class to your preferred main class
  5. Click ok
    It should work now
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!