Skip to content

Installation

This guide covers installing the VaultSandbox Java SDK and verifying your setup.

  • Java 21 or later - Required for ML-KEM-768 cryptography support
  • Gradle 8.x or Maven 3.x - Build tool
  • Network access - To Maven Central for dependencies
dependencies {
  implementation 'com.vaultsandbox:client:0.6.0'
}

If you only need the SDK for testing, add it as a test dependency:

dependencies {
  testImplementation 'com.vaultsandbox:client:0.6.0'
}

The SDK includes these dependencies automatically:

DependencyVersionPurpose
Bouncy Castle1.79ML-KEM-768 post-quantum cryptography
OkHttp4.12.0HTTP client and SSE support
Gson2.11.0JSON serialization
SLF4J API2.0.16Logging facade

The SDK automatically registers the Bouncy Castle security provider - no manual setup required.

The SDK uses SLF4J for logging. Add a logging implementation to see logs:

// Gradle
testRuntimeOnly 'ch.qos.logback:logback-classic:1.5.12'
<!-- Maven -->
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.5.12</version>
<scope>test</scope>
</dependency>

Create a simple test to verify the SDK is correctly installed:

import com.vaultsandbox.client.VaultSandboxClient;
import com.vaultsandbox.client.ClientConfig;
public class VerifyInstallation {
public static void main(String[] args) {
ClientConfig config = ClientConfig.builder()
.apiKey("your-api-key")
.baseUrl("https://gateway.example.com")
.build();
try (VaultSandboxClient client = VaultSandboxClient.create(config)) {
System.out.println("VaultSandbox client initialized successfully!");
System.out.println("Bouncy Castle provider registered.");
}
}
}

Run it:

Terminal window
# Gradle
./gradlew run
# Maven
mvn compile exec:java -Dexec.mainClass="VerifyInstallation"

If the output shows the success message, the SDK is correctly installed.

  1. Open your project (Gradle/Maven auto-detected)
  2. Wait for dependency sync to complete
  3. SDK classes will be available with auto-import
  1. File → Import → Gradle/Maven → Existing Project
  2. Select your project directory
  3. Finish import and wait for build
  1. Install the Extension Pack for Java
  2. Open the project folder
  3. Java extension auto-detects Gradle/Maven
PlatformSupported
LinuxYes
macOSYes
WindowsYes
AndroidNo (different crypto requirements)

The SDK is designed for server-side JVM applications and testing frameworks.

error: class file has wrong version 65.0, should be 61.0

Your Java version is too old. Check your version:

Terminal window
java -version

Ensure JAVA_HOME points to Java 21+:

Terminal window
export JAVA_HOME=/path/to/java21
java.security.NoSuchAlgorithmException: ML-KEM not available

The Bouncy Castle dependency may not be resolved. Check your dependency tree:

Terminal window
# Gradle
./gradlew dependencies --configuration runtimeClasspath | grep bouncy
# Maven
mvn dependency:tree | grep bouncy

If dependencies fail to download, check:

  • Network connectivity to Maven Central
  • Corporate proxy settings in ~/.gradle/gradle.properties or ~/.m2/settings.xml
gradle.properties
systemProp.http.proxyHost=proxy.example.com
systemProp.http.proxyPort=8080
SLF4J: No SLF4J providers were found.

This is a warning, not an error. Add a logging binding (Logback or Log4j2) to enable logs.