title: Exception in thread "main" java.lang.NoClassDefFoundError (Java, Appium, Android Studio)
body: <p>I keep getting an error on runtime when I'm executing from Eclipse IDE. I added the class paths for the commons-lang3, java-client and selenium webdriver for java jar packages. What am I missing?</p>
  <p>My code:</p>
  <pre><code>import java.net.MalformedURLException;
  import java.net.URL;
  
  import org.openqa.selenium.WebElement;
  import org.openqa.selenium.remote.DesiredCapabilities;
  
  import io.appium.java_client.android.AndroidDriver;
  import io.appium.java_client.remote.MobileCapabilityType;
  
  public class InstallAppAndroidEmulator {
  
      public static void main(String[] args) {
  
          DesiredCapabilities dc = new DesiredCapabilities();
  
          dc.setCapability(MobileCapabilityType.AUTOMATION_NAME, &quot;Appium&quot;);
          dc.setCapability(MobileCapabilityType.PLATFORM_NAME, &quot;Android&quot;);
          dc.setCapability(MobileCapabilityType.PLATFORM_VERSION, 9.0);
          dc.setCapability(MobileCapabilityType.DEVICE_NAME, &quot;Android Emulator&quot;);
          dc.setCapability(MobileCapabilityType.APP, &quot;C:\\Users\\Some_Name\\Desktop\\apk files\\app-test.apk&quot;);
  
          URL url = null;
          try {
              url = new URL(&quot;http://localhost:4723/wd/hub&quot;);
              AndroidDriver&lt;WebElement&gt; driver = new AndroidDriver&lt;WebElement&gt;(url, dc);
          } catch (MalformedURLException e) {
              // TODO Auto-generated catch block
              e.printStackTrace();
          }
  
      }
  
  }
  </code></pre>
  <p>Files:
  <a href="https://i.stack.imgur.com/hBtIo.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/hBtIo.png" alt="enter image description here" /></a></p>
  <p>Error message:
  <a href="https://i.stack.imgur.com/JJTzQ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/JJTzQ.png" alt="enter image description here" /></a></p>
  <p>Solved by adding missing selenium jars from lib folder (unless using a standalone library)</p>