Repository: statsig-io/docs
Pull request #3034: Update Java Core docs for Java 8 support and uber JAR
Author: login: devin-ai-integration[bot]
Created: 2025-05-19T17:07:17Z | Merged: 2025-05-19T19:14:15Z

# Java Core Documentation Updates

This PR updates the Java Core documentation to reflect two recent changes:

1. Java Core now supports Java 8 starting from version 0.4.0
2. Added information about the new "uber" classifier JAR that includes native libraries for all supported platforms:
   - Linux (x86_64, arm64)
   - macOS (x86_64, arm64)
   - Windows (x86_64)

## Changes Made
- Added uber JAR to the supported combinations table
- Updated installation instructions to include the uber JAR option
- Updated migration guide to mention Java 8 support and the uber JAR
- Updated example to include the uber JAR option

## Link to Devin run
https://app.devin.ai/sessions/2d3fac3c5fe44ca1b64d0c70e5c1eb99

Requested by: weihao@statsig.com



Diff:
diff --git a/docs/server-core/java/_example.mdx b/docs/server-core/java/_example.mdx
index 461e1ee87..a4f547867 100644
--- a/docs/server-core/java/_example.mdx
+++ b/docs/server-core/java/_example.mdx
@@ -27,8 +27,12 @@ repositories {
 }
 
 dependencies {
-    implementation 'com.statsig:javacore:X.X.X'  // Replace with latest version
-    implementation 'com.statsig:javacore:X.X.X:YOUR-OS-ARCHITECTURE'  // Replace with your OS/architecture
+    // Recommended: Self-contained Uber JAR (includes all platforms, available since version 0.4.0)
+    implementation 'com.statsig:javacore:X.X.X:uber'  // Replace with latest version
+    
+    // Advanced: Platform-specific dependencies (if you need to minimize JAR size)
+    // implementation 'com.statsig:javacore:X.X.X'  // Core library
+    // implementation 'com.statsig:javacore:X.X.X:YOUR-OS-ARCHITECTURE'  // Platform-specific library
 }
 
 application {
@@ -55,6 +59,15 @@ Create a `pom.xml` file with:
     </properties>
     
     <dependencies>
+        <!-- Recommended: Self-contained Uber JAR (includes all platforms, available since version 0.4.0) -->
+        <dependency>
+            <groupId>com.statsig</groupId>
+            <artifactId>javacore</artifactId>
+            <version>X.X.X</version>
+            <classifier>uber</classifier>
+        </dependency>
+        
+        <!-- Advanced: Platform-specific dependencies (if you need to minimize JAR size)
         <dependency>
             <groupId>com.statsig</groupId>
             <artifactId>javacore</artifactId>
@@ -66,6 +79,7 @@ Create a `pom.xml` file with:
             <version>X.X.X</version>
             <classifier>YOUR-OS-ARCHITECTURE</classifier>
         </dependency>
+        -->
     </dependencies>
 </project>
 ```
diff --git a/docs/server-core/java/_install.mdx b/docs/server-core/java/_install.mdx
index eed925169..44b53b59b 100644
--- a/docs/server-core/java/_install.mdx
+++ b/docs/server-core/java/_install.mdx
@@ -1,6 +1,6 @@
 ## Requirements
 
-- Java 8 or higher
+- Java 8 or higher (Java 8 support added in version 0.4.0)
 - Compatible with all platforms listed in the [Supported OS and Architecture Combinations](#supported-os-and-architecture-combinations) section, including:
   - macOS (x86_64, arm64)
   - Windows (x86_64, arm64, i686)
@@ -8,13 +8,21 @@
 
 ## Overview
 
-The Statsig Java SDK consists of two parts that must be installed:
-1. The platform-independent core library (required for all installations)
-2. An OS/architecture-specific native library (required for your specific platform)
+The Statsig Java SDK can be installed in two ways:
+
+**Recommended: Single JAR installation** (since version 0.4.0)
+- Use the "uber" JAR which contains both the core library and all platform-specific native libraries in a single package
+- Simplifies dependency management and deployment across different environments
+
+**Advanced: Two-part installation**
+1. The platform-independent core library
+2. An OS/architecture-specific native library for your specific platform
 
 ## Installation Steps
 
-### Step 1: Install Core Library
+### Recommended: Using the Uber JAR (All-in-One)
+
+Since version 0.4.0, Statsig provides an "uber" JAR that contains both the core library and native libraries for all supported platforms in a single package. This is the recommended approach for most users.
 
 import Tabs from "@theme/Tabs";
 import TabItem from "@theme/TabItem";
@@ -35,6 +43,63 @@ repositories {
     mavenCentral()
 }
 
+dependencies {
+    implementation 'com.statsig:javacore:X.X.X:uber' // Uber JAR with all native libraries
+}
+```
+
+You can find the latest version on [Maven Central](https://central.sonatype.com/artifact/com.statsig/javacore/overview).
+
+  </TabItem>
+  <TabItem value="maven">
+
+Add the following to your `pom.xml` file:
+
+```xml
+<dependencies>
+    <dependency>
+        <groupId>com.statsig</groupId>
+        <artifactId>javacore</artifactId>
+        <version>X.X.X</version>
+        <classifier>uber</classifier>
+    </dependency>
+</dependencies>
+```
+
+You can find the latest version on [Maven Central](https://central.sonatype.com/artifact/com.statsig/javacore/overview).
+
+  </TabItem>
+</Tabs>
+
+The uber JAR includes native libraries for:
+- Linux (x86_64, arm64)
+- macOS (x86_64, arm64)
+- Windows (x86_64)
+
+This approach eliminates the need to specify the exact platform and simplifies deployment across different environments.
+
+### Advanced: Platform-Specific Installation
+
+If you need more control over dependencies or want to minimize the JAR size for a specific platform, you can use the platform-specific installation approach.
+
+#### Step 1: Install Core Library
+
+<Tabs
+  groupId="java-build-tools"
+  defaultValue="gradle"
+  values={[
+    {label: 'Gradle', value: 'gradle'},
+    {label: 'Maven', value: 'maven'},
+  ]}>
+  <TabItem value="gradle">
+
+Add the following to your `build.gradle` file:
+
+```groovy
+repositories {
+    mavenCentral()
+}
+
 dependencies {
     implementation 'com.statsig:javacore:X.X.X'  // Replace X.X.X with the latest version
 }
@@ -62,7 +127,7 @@ You can find the latest version on [Maven Central](https://central.sonatype.com/
   </TabItem>
 </Tabs>
 
-### Step 2: Install Platform-Specific Library
+#### Step 2: Install Platform-Specific Library
 
 You need to add the appropriate OS/architecture-specific dependency. Choose one of the following methods:
 
diff --git a/docs/server-core/java/_supported_combinations.mdx b/docs/server-core/java/_supported_combinations.mdx
index 69d927d0f..a6b6bb32d 100644
--- a/docs/server-core/java/_supported_combinations.mdx
+++ b/docs/server-core/java/_supported_combinations.mdx
@@ -1,6 +1,7 @@
 | OS/Architecture Identifier | Description | Dependency |
 | --- | --- | --- |
-| `java-core` | Platform-independent Java core, **ALWAYS ADD THIS** | `implementation 'com.statsig:javacore:X.X.X'`  |
+| `java-core` | Platform-independent Java core, **ALWAYS ADD THIS** (not needed if using uber JAR) | `implementation 'com.statsig:javacore:X.X.X'`  |
+| `uber` | Self-contained JAR with both core library and native libraries for all supported platforms (available since version 0.4.0, if used, no other dependencies needed) | `implementation 'com.statsig:javacore:X.X.X:uber'` |
 | `macos-arm64` | macOS (Apple Silicon/ARM64) | `implementation 'com.statsig:javacore:X.X.X:macos-arm64'` |
 | `macos-x86_64` | macOS (Intel/x86_64 or AMD64) | `implementation 'com.statsig:javacore:X.X.X:macos-x86_64'` |
 | `windows-arm64` | Windows (ARM64) | `implementation 'com.statsig:javacore:X.X.X:windows-arm64'` |


Reviews:
user: login: weihao-statsig
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-19T17:08:20Z
user: login: weihao-statsig
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-19T17:08:56Z
user: login: weihao-statsig
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-19T17:09:59Z
user: login: weihao-statsig
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-19T17:19:06Z
user: login: weihao-statsig
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-19T17:19:52Z
user: login: weihao-statsig
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-19T17:48:24Z
user: login: weihao-statsig
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-19T17:55:54Z

Review comments:
diff_hunk: @@ -92,6 +92,58 @@ For Linux with x86_64 architecture, add the following to build.gradle:
 
 </details>
 
+<details>
+<summary>Method 3: Using the Uber JAR (includes all platforms)</summary>
+
+Since version 0.4.0, Statsig provides an "uber" JAR that includes native libraries for all supported platforms. This simplifies dependency management, especially for applications that need to run on multiple platforms.
+
+<Tabs
+  groupId="java-build-tools"
+  defaultValue="gradle"
+  values={[
+    {label: 'Gradle', value: 'gradle'},
+    {label: 'Maven', value: 'maven'},
+  ]}>
+  <TabItem value="gradle">
+
+```groovy
+dependencies {
+    implementation 'com.statsig:javacore:X.X.X'  // Core SDK (from Step 1)
+    implementation 'com.statsig:javacore:X.X.X:uber' // Uber JAR with all native libraries
path: docs/server-core/java/_install.mdx
user: login: weihao-statsig
body: No, you don't need javacore jar, uber jar contains everything
created_at: 2025-05-19T17:08:19Z
author_association: CONTRIBUTOR
diff_hunk: @@ -1,6 +1,7 @@
 | OS/Architecture Identifier | Description | Dependency |
 | --- | --- | --- |
 | `java-core` | Platform-independent Java core, **ALWAYS ADD THIS** | `implementation 'com.statsig:javacore:X.X.X'`  |
+| `uber` | Multi-platform JAR containing native libraries for all supported platforms | `implementation 'com.statsig:javacore:X.X.X:uber'` |
path: docs/server-core/java/_supported_combinations.mdx
user: login: weihao-statsig
body: containing native libraries + main jar, if use this, you just need this line
created_at: 2025-05-19T17:08:56Z
author_association: CONTRIBUTOR
diff_hunk: @@ -92,6 +92,58 @@ For Linux with x86_64 architecture, add the following to build.gradle:
 
 </details>
 
+<details>
+<summary>Method 3: Using the Uber JAR (includes all platforms)</summary>
+
+Since version 0.4.0, Statsig provides an "uber" JAR that includes native libraries for all supported platforms. This simplifies dependency management, especially for applications that need to run on multiple platforms.
+
+<Tabs
+  groupId="java-build-tools"
+  defaultValue="gradle"
+  values={[
+    {label: 'Gradle', value: 'gradle'},
+    {label: 'Maven', value: 'maven'},
+  ]}>
+  <TabItem value="gradle">
+
+```groovy
+dependencies {
+    implementation 'com.statsig:javacore:X.X.X'  // Core SDK (from Step 1)
+    implementation 'com.statsig:javacore:X.X.X:uber' // Uber JAR with all native libraries
path: docs/server-core/java/_install.mdx
user: login: weihao-statsig
body: line 3 in this file, since 0.4.0, we start support java8
created_at: 2025-05-19T17:09:59Z
author_association: CONTRIBUTOR
diff_hunk: @@ -92,6 +97,52 @@ For Linux with x86_64 architecture, add the following to build.gradle:
 
 </details>
 
+<details>
+<summary>Method 3: Using the Uber JAR (includes all platforms)</summary>
path: docs/server-core/java/_install.mdx
user: login: weihao-statsig
body: the order of method 2 & method 3 is not right
created_at: 2025-05-19T17:19:06Z
author_association: CONTRIBUTOR
diff_hunk: @@ -112,6 +112,40 @@ dependencies {
   </TabItem>
 </Tabs>
 
+Since version 0.4.0, Java Core also supports Java 8, which makes it compatible with a broader range of applications. Additionally, you can use the new "uber" JAR that includes native libraries for all supported platforms:
path: docs/server-core/java/migration.mdx
user: login: weihao-statsig
body: remove this from migration, don't modify migration guide now
created_at: 2025-05-19T17:19:52Z
author_association: CONTRIBUTOR
diff_hunk: @@ -93,7 +98,53 @@ For Linux with x86_64 architecture, add the following to build.gradle:
 </details>
 
 <details>
-<summary>Method 2: Manual Configuration</summary>
+<summary>Method 2: Using the Uber JAR (includes all platforms)</summary>
+
+Since version 0.4.0, Statsig provides an "uber" JAR that contains both the core library and native libraries for all supported platforms in a single package. This simplifies dependency management, especially for applications that need to run on multiple platforms. When using the uber JAR, you don't need any other dependencies.
+
+<Tabs
+  groupId="java-build-tools"
+  defaultValue="gradle"
+  values={[
+    {label: 'Gradle', value: 'gradle'},
+    {label: 'Maven', value: 'maven'},
+  ]}>
+  <TabItem value="gradle">
+
+```groovy
+dependencies {
+    implementation 'com.statsig:javacore:X.X.X:uber' // Uber JAR with all native libraries
+}
+```
+
+  </TabItem>
+  <TabItem value="maven">
+
+```xml
+<dependencies>
+    <dependency>
+        <groupId>com.statsig</groupId>
+        <artifactId>javacore</artifactId>
+        <version>X.X.X</version>
+        <classifier>uber</classifier>
+    </dependency>
+</dependencies>
+```
+
+  </TabItem>
+</Tabs>
+
+The uber JAR includes native libraries for:
+- Linux (x86_64, arm64)
+- macOS (x86_64, arm64)
+- Windows (x86_64)
+
+This approach eliminates the need to specify the exact platform and simplifies deployment across different environments.
+
+</details>
+
+<details>
+<summary>Method 3: Manual Configuration</summary>
path: docs/server-core/java/_install.mdx
user: login: weihao-statsig
body: What's the content of Manual Configuration then
created_at: 2025-05-19T17:48:24Z
author_association: CONTRIBUTOR
diff_hunk: @@ -1,6 +1,7 @@
 | OS/Architecture Identifier | Description | Dependency |
 | --- | --- | --- |
-| `java-core` | Platform-independent Java core, **ALWAYS ADD THIS** | `implementation 'com.statsig:javacore:X.X.X'`  |
+| `java-core` | Platform-independent Java core, **ALWAYS ADD THIS** (not needed if using uber JAR) | `implementation 'com.statsig:javacore:X.X.X'`  |
+| `uber` | Self-contained JAR with both core library and native libraries for all supported platforms (if used, no other dependencies needed) | `implementation 'com.statsig:javacore:X.X.X:uber'` |
path: docs/server-core/java/_supported_combinations.mdx
user: login: weihao-statsig
body: Can you also made it clear that it's after 0.4.0 + we have uber jar
created_at: 2025-05-19T17:55:54Z
author_association: CONTRIBUTOR

PR comments:
user: login: devin-ai-integration[bot]
created_at: 2025-05-19T17:07:22Z
body: ### 🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:
- Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
- Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:
- [ ] Disable automatic comment and CI monitoring

author_association: CONTRIBUTOR
user: login: jasonwzm
created_at: 2025-05-19T17:10:03Z
body: <!-- NETLIFY DEPLOY COMMENT GENERATED BY ACTIONS_NETLIFY - APP ID SHA256: 0038af8fad421c48cf2dd5ee95e08d2d419533ec7208a507c5ccd1696cdf8b44 -->
🚀 Deployed on https://682b82ad4a8dcad5a163b36a--cozy-fox-0defec.netlify.app
author_association: MEMBER
user: login: weihao-statsig
created_at: 2025-05-19T17:50:26Z
body: Can you deploy again? Id like to see demo

author_association: CONTRIBUTOR
user: login: weihao-statsig
created_at: 2025-05-19T19:07:44Z
body: we should be explicit in our onboarding.  Just document the fat jar approach for now, and then add an advanced setup that shows how to use platofmr specific.
author_association: CONTRIBUTOR