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.
To set up profiling configuration correctly, the profiler needs to know what is the main class of j2se project being profiled. Currently I can't see any way how to reuse the check implemented in org.netbeans.modules.java.j2seproject.J2SEActionProvider which performs exactly what we need - check if main class is correctly set and appropriate fileobject exists for a j2se project and eventually allow the user to select new main class. Currently the profiler uses similar UI copied from org.netbeans.modules.java.j2seproject.ui.customizer.MainClassWarning and org.netbeans.modules.java.j2seproject.ui.customizer.MainClassChooser to select the main class for profiling but does not set the main class to the project. Requested enhancement would prevent such duplicity. Ideally this could be fixed by providing simple 'boolean checkProjectMainClass(Project project)' which will return true if main class is correctly set or new has been selected or false if main class is still invalid.