title: URI is not absolute?
body: <p>I have a File </p>
  
  <pre><code>/user/guest/work/test/src/main/java/Test.java
  </code></pre>
  
  <p>And a <a href="https://docs.oracle.com/javase/7/docs/api/java/io/File.html" rel="noreferrer">File</a>-Object:</p>
  
  <pre><code>File f = new File("/user/guest/work/test/src/main/java/Test.java");
  </code></pre>
  
  <p>I need this outputs</p>
  
  <pre><code>System.out.println(f);                   -&gt;                       src/main/java/Test.java
  System.out.println(f.getAbsolutePath()); -&gt; /user/guest/work/test/src/main/java/Test.java
  </code></pre>
  
  <p>I tried:</p>
  
  <pre><code>File relativeTo = new File("/user/guest/work/test");
  new File(relativeTo.toURI().relativize(f.toURI()));
  </code></pre>
  
  <p>but it is throwing a </p>
  
  <pre><code>java.lang.IllegalArgumentException: URI is not absolute
     at java.io.File.&lt;init&gt;(File.java:416)
     at Test.&lt;init&gt;(Test.java:43)
  </code></pre>
  
  <p>How to get the required output?</p>