Installation
This guide covers installing the VaultSandbox Java SDK and verifying your setup.
Requirements
Section titled “Requirements”- 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
Add the Dependency
Section titled “Add the Dependency”dependencies {
implementation 'com.vaultsandbox:client:0.6.0'
} dependencies {
implementation("com.vaultsandbox:client:0.6.0")
} <dependency>
<groupId>com.vaultsandbox</groupId>
<artifactId>client</artifactId>
<version>0.6.0</version>
</dependency> Test Dependency
Section titled “Test Dependency”If you only need the SDK for testing, add it as a test dependency:
dependencies {
testImplementation 'com.vaultsandbox:client:0.6.0'
} dependencies {
testImplementation("com.vaultsandbox:client:0.6.0")
} <dependency>
<groupId>com.vaultsandbox</groupId>
<artifactId>client</artifactId>
<version>0.6.0</version>
<scope>test</scope>
</dependency> Transitive Dependencies
Section titled “Transitive Dependencies”The SDK includes these dependencies automatically:
| Dependency | Version | Purpose |
|---|---|---|
| Bouncy Castle | 1.79 | ML-KEM-768 post-quantum cryptography |
| OkHttp | 4.12.0 | HTTP client and SSE support |
| Gson | 2.11.0 | JSON serialization |
| SLF4J API | 2.0.16 | Logging facade |
The SDK automatically registers the Bouncy Castle security provider - no manual setup required.
SLF4J Logging Binding
Section titled “SLF4J Logging Binding”The SDK uses SLF4J for logging. Add a logging implementation to see logs:
// GradletestRuntimeOnly '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>// GradletestRuntimeOnly 'org.apache.logging.log4j:log4j-slf4j2-impl:2.24.0'<!-- Maven --><dependency> <groupId>org.apache.logging.log4j</groupId> <artifactId>log4j-slf4j2-impl</artifactId> <version>2.24.0</version> <scope>test</scope></dependency>Verify Installation
Section titled “Verify Installation”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:
# Gradle./gradlew run
# Mavenmvn compile exec:java -Dexec.mainClass="VerifyInstallation"If the output shows the success message, the SDK is correctly installed.
IDE Setup
Section titled “IDE Setup”IntelliJ IDEA
Section titled “IntelliJ IDEA”- Open your project (Gradle/Maven auto-detected)
- Wait for dependency sync to complete
- SDK classes will be available with auto-import
Eclipse
Section titled “Eclipse”- File → Import → Gradle/Maven → Existing Project
- Select your project directory
- Finish import and wait for build
VS Code
Section titled “VS Code”- Install the Extension Pack for Java
- Open the project folder
- Java extension auto-detects Gradle/Maven
Platform Compatibility
Section titled “Platform Compatibility”| Platform | Supported |
|---|---|
| Linux | Yes |
| macOS | Yes |
| Windows | Yes |
| Android | No (different crypto requirements) |
The SDK is designed for server-side JVM applications and testing frameworks.
Troubleshooting
Section titled “Troubleshooting”Java Version Error
Section titled “Java Version Error”error: class file has wrong version 65.0, should be 61.0Your Java version is too old. Check your version:
java -versionEnsure JAVA_HOME points to Java 21+:
export JAVA_HOME=/path/to/java21Missing Bouncy Castle
Section titled “Missing Bouncy Castle”java.security.NoSuchAlgorithmException: ML-KEM not availableThe Bouncy Castle dependency may not be resolved. Check your dependency tree:
# Gradle./gradlew dependencies --configuration runtimeClasspath | grep bouncy
# Mavenmvn dependency:tree | grep bouncyNetwork/Proxy Issues
Section titled “Network/Proxy Issues”If dependencies fail to download, check:
- Network connectivity to Maven Central
- Corporate proxy settings in
~/.gradle/gradle.propertiesor~/.m2/settings.xml
systemProp.http.proxyHost=proxy.example.comsystemProp.http.proxyPort=8080SLF4J Warning
Section titled “SLF4J Warning”SLF4J: No SLF4J providers were found.This is a warning, not an error. Add a logging binding (Logback or Log4j2) to enable logs.
Next Steps
Section titled “Next Steps”- Configuration - Configure the client
- Managing Inboxes - Create test inboxes
- Quick Start - See a complete example