title: Java does not find sql file
body: <p>I have a Java application that uses SQLite as a Database. I want to execute some setup queries that are stored in a file called &quot;setup.sql&quot;.</p>
  <p>I call the following code to read the file:</p>
  <blockquote>
  <p>BufferedReader reader = new BufferedReader(new
  FileReader(Resources.SETUP.file)))</p>
  </blockquote>
  <p><code>Resources.SETUP.file</code> is an enum that stores the file paths, in this case to &quot;sql/setup.sql&quot; located in the resources folder of my project.</p>
  <p>I use this scheme for other files like images and localization, which works perfectly, like the following example for the logo image (Enum is &quot;images/logo.png&quot;):</p>
  <blockquote>
  <p>Image logoImage = new Image(Resources.LOGO.file);</p>
  </blockquote>
  <p>However with the sql file I always get a <code>FileNotFoundException</code>.</p>
  <p>Am I using the Readers incorrectly?</p>
  <p>The following does not work:</p>
  <blockquote>
  <p>getClass().getResource(Resources.SETUP.file); -&gt; InvocationTargetException</p>
  <p>getClass().getClassLoader().getResource(Resources.SETUP.file); -&gt; FileNotFoundException</p>
  </blockquote>