title: Specifying a relative path in File in Java
body: <p>I'm uploading images using Spring and Hibernate. I'm saving images on the server as follows.</p>
  
  <pre><code>File savedFile = new File("E:/Project/SpringHibernet/MultiplexTicketBooking/web/images/" + itemName);
  item.write(savedFile);
  </code></pre>
  
  <p>Where <code>itemName</code> is the image file name after parsing the request (<code>enctype="multipart/form-data"</code>). I however need to mention the <em>relative path</em> in the constructor of <code>File</code>. Something like the one shown below.</p>
  
  <pre><code>File savedFile = new File("MultiplexTicketBooking/web/images/" + itemName);
  item.write(savedFile);
  </code></pre>
  
  <p>But it doesn't work throwing the <code>FileNotFoundException</code>. Is there a way to specify a relative path with <code>File</code> in Java?</p>