title: Creating a URL object with a relative path
body: <p>I am creating a Swing application with a <code>JEditorPane</code> that should display an HTML file named <code>url1.html</code> stored locally in the <em>page</em> folder in the root folder of the project.</p>
  <p>I have instantiated the following String object</p>
  <pre><code>final String pagePath = &quot;./page/&quot;;
  </code></pre>
  <p>and in order to be displayed by the <code>JEditorPane</code> pane I have created the following URL object:</p>
  <pre><code>URL url1 = new URL(&quot;file:///&quot;+pagePath+&quot;url1.html&quot;);
  </code></pre>
  <p>However when the <code>setPage()</code> method is called with the created URL object as a parameter:</p>
  <pre><code>pagePane.setPage(url1);
  </code></pre>
  <p>it throws me a <code>java.io.FileNotFoundException</code> error.</p>
  <p>It seems that there is something wrong with the way <code>url1</code> has been constructed. Anyone knows a solution to this problem?</p>