Netbeans 7.1 running old codes rather than new one

2019-05-28 22:35发布

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?

4条回答
淡お忘
2楼-- · 2019-05-28 23:12

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

查看更多
▲ chillily
3楼-- · 2019-05-28 23:15

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.

查看更多
ゆ 、 Hurt°
4楼-- · 2019-05-28 23:19

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
查看更多
▲ chillily
5楼-- · 2019-05-28 23:29

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.

查看更多
登录 后发表回答