title: Load CSV in java using classpath
body: <p>How to load csv file using classpath?
  Before this I tried loading file using FileReader which works fine when running locally but when deployed into external server throws exceptions like FileNotFound. Below code works in local, but when deployed the jar on tomcat folder www/[jar] throws this exception
   Unfortunately, I cannot provide the original code. here is the gist:</p>
  
  <pre><code>BufferedReader br = new BufferedReader(new FileReader("src/SSR.csv"));
      while ((line = br.readLine()) != null) {
          // use comma as separator
          String[] cols = line.split(",");
          map.put(cols[1],cols[0]); 
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/q20sA.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/q20sA.png" alt="this is the exception"></a></p>