Netbeans 7.1 running old codes rather than new ones

偶尔善良 提交于 2019-12-08 01:32:04

问题


Ok, this is really weird. I wrote some codes a day ago, and then edited the codes. Then after hours and hours of editing and rewriting and introducing new classes, I ran the codes, but then I go a response from a "System.out.println()" line that I had long removed. Basically, netbeans seems to be running a much older build of my codes. I've cleaned and re-built my codes and still nothing. It keeps running old codes.

What's going on?


回答1:


In Neatbeans by default settings will run your new code, even if you not build the project again (given that you have not modified the build settings). You can clean and Build the project again. If this also not works, just back up your codes and create a new project and include the source codes and run the project.




回答2:


Maybe you can try to clear netbeans cache

  1. close NetBeans
  2. delete cache folder (/home/user/.cache/netbeans)
  3. open the project and wait for scanning project to finish



回答3:


I had similar problem. I hit "Clean and Build", and then "Run", and it worked.




回答4:


Well, Clean it well! Check for any read only folders in your bin that prevent overwriting of class file. Go to classes folder and check date and time class files got modified.




回答5:


if clean and build didn't do the work for you try SHIFT+F6 rather than just F6 as a shortcut for RUN .That was the case for me and it works now just fine.



来源:https://stackoverflow.com/questions/12636423/netbeans-7-1-running-old-codes-rather-than-new-ones

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!