title: How can I programmatically set a source folder in Eclipse?
body: <p>I need to create small files to save basic information. I can't read and write from the files once my project is exported as a JAR, so I created a folder to store the files outside of the src folder. This only works if I set the external folder to be a source folder.</p>
  
  <p>This is the code where I create the folder</p>
  
  <pre><code>File f = new File("Characters");
  
  try{
      if(f.mkdir()) { 
          System.out.println("Directory created");
      } else {
          System.out.println("Directory not created");
      }
  } catch(Exception e){
      e.printStackTrace();
  } 
  </code></pre>
  
  <p>How can I programmatically set this folder to be a source folder?</p>
  
  <p>I hope this is specific enough.</p>