title: Close program when browser closes
body: <p>I'm creating a Chrome driver like so:</p>
  
  <pre><code>ChromeOptions chromeOptions = new ChromeOptions();
  chromeOptions.setBinary(CHROME);
  chromeOptions.addArguments("user-data-dir=" + USER_DATA_DIR);
  
  ChromeDriver chromeDriver = new ChromeDriver(chromeOptions);
  </code></pre>
  
  <p>If i close the browser (by clicking the red X) my java program just keeps alive. I then have  to click the terminate button in Eclipse. How can i exit it automaticly when the browser closes?</p>