title: Project root folder path
body: <p>I have a class in a package com.mwerner.utils that needs the path for an <code>getResourceAsStream()</code> call</p>
  
  <p>the file it is supposed to load is located in a subfolder of the project root i.e.:</p>
  
  <p>/src/com/mwerner/utils/myfile.java   has to load</p>
  
  <p>/res/file.xml</p>
  
  <p>I tried stuff like</p>
  
  <pre><code>/res/file.xml
  ../res/file.xml
  res/file.xml
  </code></pre>
  
  <p>What is the right one?</p>
  
  <p>EDIT:</p>
  
  <p>I am using Xstream to parse the XML into objects. The line of code in question is: </p>
  
  <pre><code>ObjectInputStream in = xstream.createObjectInputStream(Utils.class.getResourceAsStream("res/file.xml"));
  </code></pre>
  
  <p>I get an <code>IOException</code> with <code>unknown source</code></p>