title: Specify a Relative Path from a Package for a new File
body: <p>I'm trying to create a <code>File</code> object in order to save my properties file. I need to know how to specify a relative path from my package though because the below code does not work.</p>
  
  <pre><code>    try {
          File file = new File(new File(Thread.currentThread().getContextClassLoader().getResource("").toURI()), "com/configuration/settings.properties");
          try (FileOutputStream fileOutputStream = new FileOutputStream(file)) {
              properties.store(fileOutputStream, null);
          }
      } catch (IOException | URISyntaxException ioe) {
          System.out.println(ioe);
      }
  </code></pre>