Getting started with the Java SDK
This guide provides an introduction to the Couchbase Java SDK. It shows you how to install the SDK and write a basic sample application that highlights important aspects.
After you install the SDK, you can start exploring it on your own or proceed with a tutorial where you will build a complete, production-grade application.
At a minimum, Java 6 is required, but any newer version is also supported (including Java 8).
To use the Java SDK, point your application project object model (POM) to the library, which is available on Maven Central. Here is a typical pom.xml that you can copy and paste into your Java project:
<dependencies> <dependency> <groupId>com.couchbase.client</groupId> <artifactId>java-client</artifactId> <version>2.2.8</version> </dependency> </dependencies>
You can also download an archive that has all JARs and dependencies included but, in general, using a package manager is strongly recommended. See the "Download and API Reference" section for more details.
If you import the dependency, the following transitive dependencies are also added:
The SDK itself depends on more packages (like Netty, the Disruptor RingBuffer, and Jackson), but they are repackaged into the distributed JAR to reduce the risk of dependency clashes in your environment.