title: Not getting absolute file path from resources
body: <p>I have a template file under /src/main/resources and i want to get the absolute path of it, the problem is that I'm getting a relative path and not a absolute path.</p>
  
  <p>I need to get the absolute path of the file in my computer after loading the template inside the project. What I'm doing now is this:</p>
  
  <pre><code>URL location = this.getClass().getResource("/template/template2.vm"); 
  String fullPath = location.getPath();
  </code></pre>
  
  <p>This returns:
      (java.lang.String) vfs:/content/MyProyect-1.0.0-SNAPSHOT.war/WEB-INF/classes/templates/template2.vm</p>
  
  <p>If you do it in Eclipse it gives the full path, but deploying in Netbeans and without an IDE returns this result. I'm using jboss for deploying. </p>
  
  <p>I've also tried doing </p>
  
  <pre><code>String fullPath = location.getAbsolutePath();
  </code></pre>
  
  <p>and i keep getting this result.</p>