title: Not able to create file on runtime in linux using java code
body: <p>I am compiling maven project for running Storm Topology on linux machine. </p>
  
  <p>Following is a method in a Bolt Class,here I want to create a file on runtime where buffered Reader will collect the data from input and will write it into a file.</p>
  
  <p><strong>Tuple input object</strong> : contains the data to be written.<br>
  <strong>/root/data/javacode/top_output.csv</strong> : file name.<br>
  All IO packages are imported in the code already.</p>
  
  <pre><code>public void execute(Tuple input, BasicOutputCollector collector) {
      String sentence = input.getString(0);
      String[] process = sentence.split(" ");
      File file = new File("/root/data/jcode/top_output.csv");
      if (!file.exists()) {
          file.createNewFile();
      }
      FileWriter fw = new FileWriter(file.getAbsoluteFile());  // line no. 36
      BufferedWriter bw = new BufferedWriter(fw);  
      for (String proc : process) {
          proc = proc.trim();
          if (!proc.isEmpty()) {
              collector.emit(new Values(proc));
              bw.write(proc);    // line no. 42
          }
      }
      bw.close();
  }
  </code></pre>
  
  <p>Whenever I compile the project using <strong>mvn package</strong>,it gives compilation error :</p>
  
  <pre><code>[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ lgassStorm ---
  [WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent!
  [INFO] Compiling 4 source files to /root/data/lgassStorm/target/classes
  [INFO] -------------------------------------------------------------
  [ERROR] COMPILATION ERROR :
  [INFO] -------------------------------------------------------------
  [ERROR] /root/data/lgassStorm/src/main/java/lgaas/bolts/DataNormalizer.java:[36,19] error: unreported exception IOException; must be caught or declared to be thrown
  [ERROR] /root/data/lgassStorm/src/main/java/lgaas/bolts/DataNormalizer.java:[42,13] error: unreported exception IOException; must be caught or declared to be thrown
  [INFO] 2 errors
  </code></pre>
  
  <p>Whenever I comment Filewriter related code, it works successfully. Line number are mentioned above in code.
  What's wrong in the code?</p>