title: java.io.IOException when declaring path to log file
body: <p>I'm trying to log to a file in Java, so I looked <a href="https://stackoverflow.com/questions/15758685/how-to-write-logs-in-text-file-when-using-java-util-logging-logger/15758768#15758768">here</a> and wrote the following code:</p>
  
  <pre><code>private static final Logger log = Logger.getLogger( QualityGatesProvider.class.getName() );
  //some other code
  FileHandler fh = new FileHandler("/Users/me/.jenkins/myLogs");
  log.addHandler(fh);
  </code></pre>
  
  <p>However, on the line <code>FileHandler fh = new FileHandler("/Users/me/.jenkins/myLogs");</code>, I get this:</p>
  
  <pre><code>unreported exception java.io.IOException; must be caught or declared to be thrown
  </code></pre>
  
  <p>Any idea what could be wrong with the code?</p>