{"id":17753138,"url":"https://github.com/configcat/java-sdk","last_synced_at":"2025-08-13T22:15:54.348Z","repository":{"id":38705469,"uuid":"128563305","full_name":"configcat/java-sdk","owner":"configcat","description":"ConfigCat SDK for Java. ConfigCat is a hosted feature flag service: https://configcat.com. Manage feature toggles across frontend, backend, mobile, desktop apps. Alternative to LaunchDarkly. Management app + feature flag SDKs.","archived":false,"fork":false,"pushed_at":"2025-08-12T10:38:31.000Z","size":1043,"stargazers_count":21,"open_issues_count":1,"forks_count":6,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-08-12T12:37:20.166Z","etag":null,"topics":["android","configcat","configuration","configuration-management","feature-flag","feature-flags","feature-toggle","feature-toggles","featureflags","java","remote-config"],"latest_commit_sha":null,"homepage":"https://configcat.com/docs/sdk-reference/java","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/configcat.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2018-04-07T19:57:44.000Z","updated_at":"2025-08-12T10:38:33.000Z","dependencies_parsed_at":"2023-10-11T16:09:18.520Z","dependency_job_id":"af2806cd-cc9e-46ac-99bf-c121570a355a","html_url":"https://github.com/configcat/java-sdk","commit_stats":null,"previous_names":[],"tags_count":45,"template":false,"template_full_name":null,"purl":"pkg:github/configcat/java-sdk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/configcat%2Fjava-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/configcat%2Fjava-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/configcat%2Fjava-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/configcat%2Fjava-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/configcat","download_url":"https://codeload.github.com/configcat/java-sdk/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/configcat%2Fjava-sdk/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270148542,"owners_count":24535701,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-12T02:00:09.011Z","response_time":80,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","configcat","configuration","configuration-management","feature-flag","feature-flags","feature-toggle","feature-toggles","featureflags","java","remote-config"],"created_at":"2024-10-26T13:22:51.200Z","updated_at":"2025-08-13T22:15:54.312Z","avatar_url":"https://github.com/configcat.png","language":"Java","readme":"# ConfigCat SDK for Java\n[![Java CI](https://github.com/configcat/java-sdk/actions/workflows/java-ci.yml/badge.svg?branch=master)](https://github.com/configcat/java-sdk/actions/workflows/java-ci.yml)\n[![Maven Central](https://img.shields.io/maven-central/v/com.configcat/configcat-java-client)](https://central.sonatype.com/artifact/com.configcat/configcat-java-client)\n[![Javadocs](http://javadoc.io/badge/com.configcat/configcat-java-client.svg)](http://javadoc.io/doc/com.configcat/configcat-java-client)\n[![Coverage Status](https://img.shields.io/sonar/coverage/configcat_java-sdk?logo=SonarCloud\u0026server=https%3A%2F%2Fsonarcloud.io)](https://sonarcloud.io/project/overview?id=configcat_java-sdk)\n[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=configcat_java-sdk\u0026metric=alert_status)](https://sonarcloud.io/dashboard?id=configcat_java-sdk)\n![License](https://img.shields.io/github/license/configcat/java-sdk.svg)\n\nConfigCat SDK for Java provides easy integration for your application to [ConfigCat](https://configcat.com).\n\n## Getting started\n\n### 1. Install the ConfigCat SDK\n*Maven:*\n```xml\n\u003cdependency\u003e\n  \u003cgroupId\u003ecom.configcat\u003c/groupId\u003e\n  \u003cartifactId\u003econfigcat-java-client\u003c/artifactId\u003e\n  \u003cversion\u003e[8.0.0,)\u003c/version\u003e\n\u003c/dependency\u003e\n```\n*Gradle:*\n```groovy\nimplementation \"com.configcat:configcat-java-client:8.+\"\n```\n\n### 2. Go to the \u003ca href=\"https://app.configcat.com/sdkkey\" target=\"_blank\"\u003eConfigCat Dashboard\u003c/a\u003e to get your *SDK Key*:\n![SDK-KEY](https://raw.githubusercontent.com/ConfigCat/java-sdk/master/media/readme02-3.png  \"SDK-KEY\")\n\n### 3. Import *com.configcat.** in your application code\n```java\nimport com.configcat.*;\n```\n\n### 4. Create a *ConfigCat* client instance\n```java\nConfigCatClient client = ConfigCatClient.get(\"#YOUR-SDK-KEY#\");\n```\n\n### 5. Get your setting value\n```java\nboolean isMyAwesomeFeatureEnabled = client.getValue(Boolean.class, \"isMyAwesomeFeatureEnabled\", false);\nif(isMyAwesomeFeatureEnabled) {\n    doTheNewThing();\n} else{\n    doTheOldThing();\n}\n```\nOr use the async APIs:\n```java\nclient.getValueAsync(Boolean.class, \"isMyAwesomeFeatureEnabled\", false)\n    .thenAccept(isMyAwesomeFeatureEnabled -\u003e {\n        if(isMyAwesomeFeatureEnabled) {\n            doTheNewThing();\n        } else{\n            doTheOldThing();\n        }\n    });\n```\n\n### 6. Close the client on application exit\n```java\nclient.close();\n```\n\n## Getting user-specific setting values with Targeting\nUsing this feature, you will be able to get different setting values for different users in your application by passing a `User Object` to the `getValue()` function.\n\nRead more about Targeting [here](https://configcat.com/docs/advanced/targeting/).\n\n\n## User Object\nPercentage and targeted rollouts are calculated by the user object passed to the configuration requests.\nThe user object must be created with a **mandatory** identifier parameter which uniquely identifies each user:\n```java\nUser user = User.newBuilder()\n        .build(\"#USER-IDENTIFIER#\"); // mandatory\n\nboolean isMyAwesomeFeatureEnabled = client.getValue(Boolean.class, \"isMyAwesomeFeatureEnabled\", user, false);\nif(isMyAwesomeFeatureEnabled) {\n    doTheNewThing();\n} else{\n    doTheOldThing();\n}\n```\n\n## Sample/Demo app\n* [Sample Console App](https://github.com/ConfigCat/java-sdk/tree/master/samples/console)\n* [Sample Web app](https://github.com/ConfigCat/java-sdk/tree/master/samples/web)\n\n## Polling Modes\nThe ConfigCat SDK supports three different polling mechanisms to acquire the setting values from ConfigCat. After the latest setting values are downloaded, they are stored in an internal cache . After that, all requests are served from the cache. Read more about Polling Modes and how to use them at [ConfigCat Java Docs](https://configcat.com/docs/sdk-reference/java/) or [ConfigCat Android Docs](https://configcat.com/docs/sdk-reference/android/).\n\n## Support\nIf you need help using this SDK, feel free to contact the ConfigCat Staff at [https://configcat.com](https://configcat.com). We're happy to help.\n\n## Contributing\nContributions are welcome. For more info please read the [Contribution Guideline](CONTRIBUTING.md).\n\n## About ConfigCat\nConfigCat is a feature flag and configuration management service that lets you separate feature releases from code deployments. You can turn features ON/OFF using the \u003ca href=\"http://app.configcat.com\" target=\"_blank\"\u003eConfigCat Dashboard\u003c/a\u003e even after they are deployed. ConfigCat lets you target specific groups of users based on region, email, or any other custom user attribute.\n\nConfigCat is a \u003ca href=\"https://configcat.com\" target=\"_blank\"\u003ehosted feature flag service\u003c/a\u003e that lets you manage feature toggles across frontend, backend, mobile, and desktop apps. \u003ca href=\"https://configcat.com\" target=\"_blank\"\u003eAlternative to LaunchDarkly\u003c/a\u003e. Management app + feature flag SDKs.\n\n- [Official ConfigCat SDKs for other platforms](https://github.com/configcat)\n- [Documentation](https://configcat.com/docs)\n- [Blog](https://configcat.com/blog)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fconfigcat%2Fjava-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fconfigcat%2Fjava-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fconfigcat%2Fjava-sdk/lists"}