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.
"[FFJ CUSTBUG]" Hi there, an EOU or new feature submitted by a customer. Description: It is annoying that I must select the Main class in my project before I start the debugger (F5). If I don't, I get the error java.lang.NoSuchMethodError: main Exception in thread "main" I have set the main class already, so Forte knows which is the main class. FFJ Support Engg Comment : I know that a given class may be invoked by more than one main class or so, but the Ide should have a good way of handling it maybe pop up a dialog with list of mains asking which you wanna run or something. Kishore
If you have set the project's main class, you can invoke action "Debug Project" (Ctrl-Shift-F5), accessible from the main menu: Project->Debug Project. A survey says that many users expect the current behaviour and another big group of users expect that F5 invokes the project's main class. But neither of these groups of users is significantly higher that the other.
What we can do is: if main class is set we can ask user (after F5) if she want to start project main class or current one. Doe it make sense?
To be pedantic: The dialog would be displayed only if the selected class is not the project's main class and both classes (the project's main class and the selected class) are executable. Is it correct?
Hello I guess I didnt explain myself clearly here sorry, I entered this bug. Now lets say you have a class A which does not have a main method in it and I start the debugger from there , then now FFJ tries to execute that class itself and complains java.lang.NoSuchMethodError: main. Its dumb cause obviously there is no main method in this class (the user knows it but expects it to execute the main class for the project) , so the user is forced to start the debugger from the class with the main method which inturn invokes the class A. Instead there are different things that the user may want at this point. So dispalying a dialog with the following options and asking him what he wants to do is useful and the dialog must allow him to set one behaviour as default, then the dialog should not appear each time or whatever. User must be able to change his setting later. the options are 1) do you want to execute this class? 2) Do you want to execute the main class that invokes this class. If he chooses option 2 and there are more than 1 main classes ( I mean a class that has a main method in it) that invoke class A's methods (from which we started the debugger) , then it should show a list and ask which one you want to run. Hope it clarifies things.
Target milestone was changed from '3.4' to TBD.
Fixed by projects integration. By F5 you start to debug the main project.
Verified ... and Closing all issues resolved into NetBeans 6.7 and earlier.