Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 306815

Summary: JDT does not recognize to launch a program as Java application if main(..) is in superclass
Product: [Eclipse Project] JDT Reporter: Praveen <pinnamur>
Component: DebugAssignee: JDT-Debug-Inbox <jdt-debug-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: darin.eclipse, markus.kell.r, remy.suen
Version: 3.6   
Target Milestone: ---   
Hardware: PC   
OS: All   
Whiteboard: stalebug

Description Praveen CLA 2010-03-23 07:51:54 EDT
I have 2 classes - 'SuperClass' containing main method, and a 'SubClass' that is empty and extending SuperClass.
When I try to launch SubClass (as Java application), 'Run As' menu does not list 'Java Application' option for launching it. I am forced to create a new run configuration and locate the class containing main method to execute SubClass though it can extend main method from its parent.
Please note that I can execute SubClass using java command directly. So, I feel that even JDT should recognize that SubClass can be executed as a Java Application.
Comment 1 Markus Keller CLA 2010-03-23 08:05:33 EDT
That could become quite expensive to calculate. Low priority for me.
Comment 2 Darin Wright CLA 2010-03-23 09:47:03 EDT
The launch shortcut's enablement is computed as the menu is shown. It would be too expensive to compute a type hierarchy - the UI would hang as the menu is displayed.
Comment 3 Eclipse Genie CLA 2020-05-11 12:34:49 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.