title: Exception in thread "main" java.lang.NoClassDefFoundError: com/google/common/collect/ImmutableMap error using Selenium Java
body: <p>Code trials:</p>
  <pre><code>package SeleniumSessions;
  
  import org.openqa.selenium.WebDriver;
  import org.openqa.selenium.chrome.ChromeDriver;
  
  
  public class TestChrome {
  
      public static void main(String[] args) {
         System.setProperty(&quot;webdriver.chrome.driver&quot;, &quot;C:\\chromedriver.exe&quot;);
  
          WebDriver driver=new ChromeDriver();
  
          driver.get(&quot;https://www.google.com&quot;);
  
      }
  }
  </code></pre>
  <p>Error:</p>
  <pre><code>Exception in thread &quot;main&quot; java.lang.NoClassDefFoundError: com/google/common/collect/ImmutableMap
      at org.openqa.selenium.chrome.ChromeDriver$ChromeDriverCommandExecutor.getExtraCommands(ChromeDriver.java:122)
      at org.openqa.selenium.chrome.ChromeDriver$ChromeDriverCommandExecutor.&lt;init&gt;(ChromeDriver.java:118)
      at org.openqa.selenium.chrome.ChromeDriver.&lt;init&gt;(ChromeDriver.java:106)
      at org.openqa.selenium.chrome.ChromeDriver.&lt;init&gt;(ChromeDriver.java:93)
      at org.openqa.selenium.chrome.ChromeDriver.&lt;init&gt;(ChromeDriver.java:48)
      at SeleniumSessions.TestChrome.main
  </code></pre>
  <p>Error snapshot:
  <img src="https://i.stack.imgur.com/v7W3N.png" alt="enter image description here" /></p>