Feature SDK implementation
Java
Strongly typed decisions for Spring, servlet, and JVM service architectures.
JVM serverThis runtime cannot execute inside a Next.js browser process. The page shows the native, official SDK shape; use the JavaScript, React, or Next.js pages for a live decision and event round trip with the same project, flag, event, and visitor ID.
Implementation
Official docs ↗implementation "com.optimizely.ab:core-api:VERSION"
Optimizely optimizely = OptimizelyFactory.newDefaultInstance(SDK_KEY);
OptimizelyUserContext user = optimizely.createUserContext("visitor-123");
OptimizelyDecision decision = user.decide("demo_flag");
user.trackEvent("demo_purchase");