This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
I have a Java class file that I'm modifying inside a large project. Inside that Java class, I have a main() function, which I use to test some functionality of the class's methods. I modify contents of this file, and then I hit "Shift + F6" to run the file. The file executes, however, I've noticed that somehow it's one compilation behind. More precisely, what I mean by this is that let's say that I have the line: System.err.println("Hello world 1"); in my class file. I clean the project and rebuild and run: I get "Hello World 1". Now, I'm going to change the line to : System.err.println("Hello World 2"); I don't clean nor rebuild the project. Instead, I hit "Shift + F6". The file executes, but I get: "Hello World 1". I now change the line to: System.err.println("Hello World 3"); I don't clean nor rebuild. Instead, I hit "Shift + F6". The file executes, but I get: "Hello World 2". NOTES: In the properties section, I have "Compile on Save" enabled. I don't believe that I've seen this when I hit "F6" to run the entire project, but I've definitely seen it on "Shift + F6" on occasion.
This should be already fixed, see issue 158218. Thanks for your report anyway *** This issue has been marked as a duplicate of 158218 ***