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.
Created attachment 101245 [details] Screenshot of the project explorer and the main class selection dialog This happened to me using the following steps, but I am not sure if the problem can be reproduced consistently this way: 1. Create a new Java library project 2. Create a class and type in a main method in it 3. Copy/paste this class under a different name The first class has an icon badge indicating it is executable, while the second one does not. At the same time, when I try to run the project, both classes are correctly detected as having the main method. See the attached screenshot.
Issue 226299 may be a duplicate.
*** Bug 226299 has been marked as a duplicate of this bug. ***
This is still valid. 1. Raname a Class with a main() method. 2. Use Hint to rename the Java file and the "Needs to be compiled" glyph goes away. Workaround: Restart NetBeans. Product Version: NetBeans IDE Dev (Build 201509180002) Java: 1.8.0_60; Java HotSpot(TM) 64-Bit Server VM 25.60-b23 Runtime: Java(TM) SE Runtime Environment 1.8.0_60-b27 System: Windows 7 version 6.1 running on amd64; Cp1252; en_US (nb)
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue. Thanks for your cooperation, NetBeans IDE 8.2 Release Boss
Verified Fixed Product Version: NetBeans IDE Dev (Build 201607140002) Java: 1.8.0_92; Java HotSpot(TM) 64-Bit Server VM 25.92-b14 Runtime: Java(TM) SE Runtime Environment 1.8.0_92-b14 System: Windows 7 version 6.1 running on amd64; UTF-8; en_US (nb)