title: How to default the working directory for JUnit launch configurations in Eclipse?
body: <p>Our Java code (not the test code) reads files from the current directory, which means the working directory needs to be set properly whenever we run the code.</p>
  
  <p>When launching a JUnit test from within Eclipse, a launch configuration automatically gets created. The problem is, that the working directory in that launch configuration is always by default the root project directory which is always wrong, the test fails, I have to open the launch configuration dialog, change the working directory and relaunch the test. This is very annoying. The same thing happens when I run a single test method.</p>
  
  <p>I've already considered these:</p>
  
  <ul>
  <li>Changing the current directory from the test code - not possible by design.</li>
  <li>When opening a file, pass a parent directory parameter - too difficult, since this would affect lots of places.</li>
  <li>Use the <em>Copy launch configuration</em> feature of Eclipse to create new launch configurations from existing ones that already have a correct working directory set. This doesn't really makes sense here, since I would like to launch a test or a test method quickly, just by invoking "run this test / method as JUnit test".</li>
  </ul>
  
  <p>All in all, it looks like it's responsibility of Eclipse, not the code.</p>
  
  <p>Is there a way to set the <strong>default</strong> working directory for <strong>all future, newly created</strong> JUnit launch configurations?</p>