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.

Bug 189268 - Main class icon badge is not displayed consistently
Summary: Main class icon badge is not displayed consistently
Status: VERIFIED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Project (show other bugs)
Version: 7.0
Hardware: PC All
: P4 normal (vote)
Assignee: Tomas Zezula
URL:
Keywords:
: 226299 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-08-06 12:04 UTC by Petr Jiricka
Modified: 2016-07-19 07:24 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Screenshot of the project explorer and the main class selection dialog (137.91 KB, image/png)
2010-08-06 12:04 UTC, Petr Jiricka
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Petr Jiricka 2010-08-06 12:04:08 UTC
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.
Comment 1 MackSix 2013-02-19 01:37:53 UTC
Issue 226299 may be a duplicate.
Comment 2 MackSix 2015-09-18 17:00:21 UTC
*** Bug 226299 has been marked as a duplicate of this bug. ***
Comment 3 MackSix 2015-09-18 17:02:29 UTC
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)
Comment 4 Martin Balin 2016-07-07 07:18:46 UTC
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
Comment 5 MackSix 2016-07-19 07:24:29 UTC
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)