Community
Participate
Working Groups
Build Identifier: 20090920-1017 The working directory created for new Run Configurations is hard-coded. If the configuration has been created directly in the dialog, it seems to be the working directory of eclipse itself (e.g. C:\Program Files\Eclipse) which is almost always a wrong default. If the configuration has been created by the context menu of a specific file or project, the default working directory is ${workspace_loc:projectname}. I am used to projects, where you have one project for "Environment" and a lot of different projects (usually containing tests) that all need to have the "Environment" project as "current directory" (to maximize simulation of the original application. Therefore, I have to manually set the current directory for every run configuration created over and over again. Especially with testing classes, Run Configurations are created constantly. So the step always has to be: Launch the class with context menu, have it fail because of wrong working directory, open Run configuration, change working directory, Run again. A configurable default working directory would be most appreciated. This has been suggested in several forums before. A couple of solutions has been brought up over the years from which non are working anymore: The old "String Substitution" trick by setting "workspace_loc" to the Environment project location (http://www.eclipse.org/forums/index.php?t=msg&goto=63344) doesn't work anymore, as the String Substitution dialog doesn't support for parameters to variables (or at least I couldn't find any mention in the documentation and all obvious tries failed). Passing "-data directory" to eclipse.exe does not seem to have an effect either anymore (http://dev.eclipse.org/newslists/news.eclipse.tools/msg24139.html) "Duplicate" does not work together with the "Run as" context menu (http://stackoverflow.com/questions/981213/default-eclipse-working-directory). Reproducible: Always Steps to Reproduce: 1. Select any file in explorer 2. Right-click, Run-As, some target (e.g. "Java Class") 3. The file will always be run with default working directory, which is ${workspace_loc:projectname}.
Maybe the option to use the Workspace Data directory might be nice.
Can we have the default location defined in Run/Debug Preferences as defined for Launch Configurations for Eclipse and Junits under PDE preferences ?