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

Bug 85265

Summary: launch config created for test case as inner class is invalid
Product: [Eclipse Project] JDT Reporter: Rafael Chaves <eclipse>
Component: UIAssignee: JDT-UI-Inbox <jdt-ui-inbox>
Status: RESOLVED DUPLICATE QA Contact:
Severity: normal    
Priority: P3    
Version: 3.1   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Rafael Chaves CLA 2005-02-15 10:26:44 EST
i200502150800 (seems to happen since M4 at least)

This was reported in the newsgroups: 

news://news.eclipse.org:119/cuj446$8k9$1@www.eclipse.org

When creating a launch configuration automatically from the selected class, if
the test case class is a public static inner class, the test class name shows as:

<package>.<outer-class>$<inner-class>

So launching the configuration will fail (Test type does not exist)

If you manually change the class name to be

<package>.<outer-class>.<inner-class>

It works just fine.
Comment 1 Martin Aeschlimann CLA 2005-02-15 11:46:20 EST
Just saw from the bewsgroup message it's in fact a Junit run test
Comment 2 Rafael Chaves CLA 2005-02-15 12:00:25 EST
It seems that for a Java application (a class containing main) the JVM actually
requires the class name to be specified using '$' instead of '.'. But I don't
think this is accepted anywhere in the Java API (for dynamic class loading, as
in the JUnit case, for instance).
Comment 3 Martin Aeschlimann CLA 2005-02-15 12:14:39 EST
*** This bug has been marked as a duplicate of 79640 ***

*** This bug has been marked as a duplicate of 79640 ***