title: Install chromedriver in eclipse Java
body: <p>I am trying to learn about selenium in Java and I have started this code with my first failure ..
  Here's the code I have in eclipse for Java</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>package selenium.basics;
  
  
  import org.openqa.selenium.WebDriver;
  import org.openqa.selenium.chrome.ChromeDriver;
  
  public class ChromeTest {
  
   public static void main(String[] args) {
  
    System.setProperty("webdriver.chrome.driver", "C:\\selenium-java-3.141.59\\drivers\\chromedriver.exe");
    ChromeDriver driver = new ChromeDriver();
    
    driver.get("http://www.google.com");
   }
   
  }</code></pre>
  </div>
  </div>
  </p>
  
  <p>and I got this error message </p>
  
  <pre><code>Exception in thread "main" java.lang.NoClassDefFoundError: org/openqa/selenium/chrome/ChromeDriver
      at selenium.basics.ChromeTest.main(ChromeTest.java:12)
  Caused by: java.lang.ClassNotFoundException: org.openqa.selenium.chrome.ChromeDriver
      at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:583)
      at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
      at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
      ... 1 more
  </code></pre>
  
  <p>Tried using this line but the same problem</p>
  
  <pre><code>WebDriver driver = new ChromeDriver();
  </code></pre>
  
  <p>I am confused a little about libraries path
  <a href="https://i.stack.imgur.com/PZEVe.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/PZEVe.png" alt="enter image description here"></a></p>
  
  <p>I tried this ...
  <a href="https://i.stack.imgur.com/pokYn.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/pokYn.png" alt="enter image description here"></a></p>
  
  <p>Then I changed this line</p>
  
  <pre><code>WebDriver driver = (WebDriver) new ChromeDriver();
  </code></pre>
  
  <p>And this is what I got now</p>
  
  <pre><code>Exception in thread "main" java.lang.NoClassDefFoundError: org/openqa/selenium/chrome/ChromeDriver
  at selenium.basics.ChromeTest.main(ChromeTest.java:11)
  Caused by: java.lang.ClassNotFoundException: 
  org.openqa.selenium.chrome.ChromeDriver
  at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:583)
  at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
      at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
  ... 1 more
  </code></pre>
  
  <p>I am still trying and I have copied and paste the chromedriver.exe to the same path of the project (I thought this may be a problem)
  and here is the new code in snapshot. Notice the red line at new ChromeDriver part .. this may solve the problem if we get rid of this red line
  <a href="https://i.stack.imgur.com/g68Aw.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/g68Aw.png" alt="enter image description here"></a></p>