Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/launchdarkly/hello-java
Hello LaunchDarkly for Java
https://github.com/launchdarkly/hello-java
example examples feature-flags feature-toggles java jvm launchdarkly sdk-examples
Last synced: 3 months ago
JSON representation
Hello LaunchDarkly for Java
- Host: GitHub
- URL: https://github.com/launchdarkly/hello-java
- Owner: launchdarkly
- License: other
- Created: 2015-10-06T19:59:45.000Z (over 8 years ago)
- Default Branch: main
- Last Pushed: 2024-03-27T22:21:38.000Z (3 months ago)
- Last Synced: 2024-03-27T23:28:41.000Z (3 months ago)
- Topics: example, examples, feature-flags, feature-toggles, java, jvm, launchdarkly, sdk-examples
- Language: Java
- Size: 148 KB
- Stars: 3
- Watchers: 45
- Forks: 23
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Lists
- awesome-launchdarkly - Java ☕️ Hello LaunchDarkly
README
# 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](https://app.launchdarkly.com/quickstart#/) or the [Java SDK reference guide](https://docs.launchdarkly.com/sdk/server-side/java).
## Build instructions
This project uses [Gradle](https://gradle.org/). 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 6.
1. Edit `src/main/java/Hello.java` and set the value of `SDK_KEY` to your LaunchDarkly SDK key. If there is an existing boolean feature flag in your LaunchDarkly project that you want to evaluate, set `FEATURE_FLAG_KEY` to the flag key.
```java
static final String SDK_KEY = "1234567890abcdef";static final String FEATURE_FLAG_KEY = "my-flag";
```2. On the command line, run `./gradlew run` (or, on Windows, `gradlew run`).
You should see the message `"Feature flag '' is for this context"`.