title: Creating Runnable Jar with external files included
body: <p>I want to build a runnable jar in java. I need to include some of the  files in the jar so that when I execute jar the files are automatically read from the java class. Hence I created a folder in the project and referred these files from the project. I created jar file following some tutorial but I could not able to include these external files in my jar file. Please let me about creating runnable jar with external files.</p>
  
  <p>My file struture is</p>
  
  <pre><code>Test
  |
  |
  -------src
  |        |
  |        default package
  |                      |
  |                      |
  |                      test1.java
  |
   -------FileFOlder
  |              |
  |              | 
  |              abc.txt
  </code></pre>
  
  <p>I am accessing <strong>abc.txt</strong> in <strong>test1.java</strong> class. 
  My code is, </p>
  
  <pre><code>public class test1 {
  
  
  public static void main(String[] args) throws IOException {
  
  
      char [] read = new char[20];
      String path = new File(".").getCanonicalPath();
      path = path+"\\Newfolder\\abc.txt";
      System.out.println(path);
      File nF = new File(path);
      FileReader fR = new FileReader(nF);
      fR.read(read);
      for(char c : read){
          System.out.print(c);
      }
      fR.close();
      System.out.println(" Hi..This is test program ");
  }
  
  }
  </code></pre>
  
  <p>When I create executable jar using eclipse export option, I am unable to see FileFolder directory inside the jar. Please give me some information regarding this. </p>