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

Bug 359402

Summary: Not able to run JUnit Plug-in Test for a Swing application due to -XstartOnFirstThread being set
Product: [Eclipse Project] JDT Reporter: Robert Krueger <krueger>
Component: DebugAssignee: JDT-Debug-Inbox <jdt-debug-inbox>
Status: RESOLVED WORKSFORME QA Contact:
Severity: normal    
Priority: P3 CC: amj87.iitr, Michael_Rennie
Version: 3.7.1   
Target Milestone: ---   
Hardware: PC   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:

Description Robert Krueger CLA 2011-09-29 07:21:14 EDT
Build Identifier: M20110909-1335

I'm developing an OSGI-based Swing application within Eclipse on Mac OS 10.6. I'm trying to get a JUnit Plug-In Test to run but the Swing application does not start because of the -XstartOnFirstThread command line parameter that is always being set, which I can see looking at the output of ps. I verified that the exact same command line Eclipse assembles works when executed outside of Eclipse without -XstartOnFirstThread. However, then, of course, the RemoteTestRunner fails because it attempts to connect to something that isn't listening (I assume that starting a JUnit Plugin Test run config opens a server socket to await the test results or something like that). At the moment I cannot think of any workaround other than wrapping a shell script around my java executable to remove the parameter but that would require configuring a separate JRE for this purpose which feels very hackish.

Reproducible: Always

Steps to Reproduce:
Any app using Swing will not run as a JUnit Plug-In test on Mac OS X AFAIK
Comment 1 Ayushman Jain CLA 2011-09-29 09:21:33 EDT
Moving to JDT/Debug
Comment 2 Michael Rennie CLA 2013-12-06 11:11:57 EST
bug 211625 added support to not include the -XstartOnFirstThread argument via the Arguments tab when launching.

Closing worksforme.