Skip to content

gitarcode/launchdarkly-hello-java

This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

feba19e · Mar 15, 2025

History

91 Commits
Oct 18, 2024
Oct 16, 2024
Apr 18, 2024
Mar 15, 2025
Jul 29, 2022
Apr 23, 2024
Oct 13, 2015
Apr 25, 2024
Oct 16, 2023
Aug 24, 2020
Aug 24, 2020

Repository files navigation

LaunchDarkly sample Java application

We've built a simple console application that demonstrates how LaunchDarkly's SDK works.

Below, you'll find the basic build procedure, but for more comprehensive instructions, you can visit your Quickstart page or the Java SDK reference guide.

Build instructions

This project uses Gradle. It requires that Java is already installed on your system (version 8 or higher). It will automatically use the latest release of the LaunchDarkly SDK with major version 7.

  1. Set the value of environment variable LAUNCHDARKLY_SDK_KEY to your LaunchDarkly SDK key. If there is an existing boolean feature flag in your LaunchDarkly project that you want to evaluate, edit src/main/java/Hello.java and set FEATURE_FLAG_KEY in code to the flag key.
  export LAUNCHDARKLY_SDK_KEY=1234567890abcdef
  static final String FEATURE_FLAG_KEY = "my-flag";
  1. On the command line, run ./gradlew run (or, on Windows, gradlew run).

You should receive the message "The feature flag evaluates to ." The application will run continuously and react to the flag changes in LaunchDarkly.

About

Hello LaunchDarkly for Java

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 100.0%