title: java.io.IOException: Couldn't get lock for
body: <p>Get error as </p>
  
  <p>"java.io.IOException: Couldn't get lock for ..\log\abc.log", 
  not sure why this happen. </p>
  
  <p>Can somebody help me out? Thank you</p>
  
  <pre><code>        logger = LogManager.getLogManager().getLogger(className);
          FileHandler logFile = new FileHandler(file);
  
          // create txt Formatter
          SimpleFormatter formatterTxt = new SimpleFormatter();
          logFile.setFormatter(formatterTxt);         
          logger.addHandler(logFile);
  </code></pre>