The SurrealDB SDK for Java is available on the Maven Central repository. You can add it to your project using Gradle or Maven.
Note
The SDK requires Java JDK version 8 or later.
Install the SDK
Install the SurrealDB SDK from Maven Central using Gradle or Maven.
ext {
surrealdbVersion = "2.1.1"
}
dependencies {
implementation "com.surrealdb:surrealdb:${surrealdbVersion}"
}Import the SDK
After installing, you can access the SDK by importing from the com.surrealdb package.
import com.surrealdb.Surreal;Next steps
Getting started for a complete working example
Connecting to SurrealDB for connection options and protocols
Authentication for signing in and managing credentials