title: why it is giving this Error: Unable to initialize main class Frst Caused by: java.lang.NoClassDefFoundError: org/openqa/selenium/WebDriver
body: <pre><code>import org.openqa.selenium.By;  
  import org.openqa.selenium.WebDriver;  
  import org.openqa.selenium.chrome.ChromeDriver;  
    
  public class Frst{  
    
      public static void main(String[] args) {  
          
      // declaration and instantiation of objects/variables  
      System.setProperty(&quot;webdriver.chrome.driver&quot;, &quot;F:\\Eclipse\\New folder\\chromedriver.exe&quot;);  
      WebDriver driver=new ChromeDriver();  
        
  // Launch website  
      driver.navigate().to(&quot;http://www.google.com/&quot;);  
            
      // Click on the search text box and send value  
      driver.findElement(By.id(&quot;lst-ib&quot;)).sendKeys(&quot;hudai&quot;);  
            
      // Click on the search button  
      driver.findElement(By.name(&quot;btnK&quot;)).click();  
        
      }  
    
  }
  </code></pre>
  <p>Error: Unable to initialize main class Frst Caused by: java.lang.NoClassDefFoundError: org/openqa/selenium/WebDriver</p>