The Appium Java client is the bridge between your test code and the Appium server. It wraps the W3C WebDriver HTTP protocol in a typed Java API, providing AndroidDriver, IOSDriver, and all the mobile-specific gestures and commands you'll use throughout this course.
Maven setup
Add the dependency to your pom.xml:
<dependencies>
<dependency>
<groupId>io.appium</groupId>
<artifactId>java-client</artifactId>
<version>9.3.0</version>
</dependency>
</dependencies>The java-client pulls in Selenium transitively. You don't need to declare Selenium separately unless you need a specific version that differs from what java-client bundles. Check the java-client release notes to confirm the bundled Selenium version before overriding it.
Gradle setup
dependencies {
testImplementation 'io.appium:java-client:9.3.0'
}Or in Kotlin DSL:
dependencies {
testImplementation("io.appium:java-client:9.3.0")
}Verifying the setup
Create a minimal test class that imports the driver:
import io.appium.java_client.android.AndroidDriver;
import io.appium.java_client.android.options.UiAutomator2Options;
import org.testng.annotations.Test;
public class SmokeTest {
@Test
public void verifyImports() {
// If this compiles, the dependency is correctly wired
UiAutomator2Options options = new UiAutomator2Options();
System.out.println("Appium Java Client loaded: " + options.getClass().getSimpleName());
}
}Run mvn compile (or gradle compileTestJava). A successful build confirms the client is on the classpath.
Common setup mistakes
Wrong scope. If you declare the dependency with <scope>test</scope> in Maven, it won't be available in src/main/java. For pure test projects, test scope is fine — just keep page objects in src/test/java.
Version conflicts. If your project already uses Selenium directly, adding java-client may pull a second Selenium version into the dependency tree. Run mvn dependency:tree | grep selenium to inspect what's resolved. If versions conflict, exclude Selenium from java-client and declare the shared version explicitly.
JDK mismatch. Java-client 9.x requires Java 11+. Verify your project's <source> and <target> settings match.