---
description: "Build Conductor workers in Java with automated polling, thread management, and Spring Boot integration."
---
# Java SDK
!!! info "Source"
GitHub: [conductor-oss/java-sdk](https://github.com/conductor-oss/java-sdk) | Report issues and contribute on GitHub.
## Start Conductor server
If you don't already have a Conductor server running, pick one:
**Docker (recommended, includes UI):**
```shell
docker run -p 8080:8080 conductoross/conductor:latest
```
The UI will be available at `http://localhost:8080` and the API at `http://localhost:8080/api`
**MacOS / Linux (one-liner):** (If you don't want to use docker, you can install and run the binary directly)
```shell
curl -sSL https://raw.githubusercontent.com/conductor-oss/conductor/main/conductor_server.sh | sh
```
**Conductor CLI**
```shell
# Installs conductor cli
npm install -g @conductor-oss/conductor-cli
# Start the open source conductor server
conductor server start
# see conductor server --help for all the available commands
```
## Install the SDK
The SDK requires Java 17+. Add the following dependency to your project:
**For Gradle:**
```gradle
dependencies {
implementation 'org.conductoross:conductor-client:5.0.1'
// Optionally, you can also add spring module for auto configuration
// implementation 'org.conductoross:conductor-client-spring:5.0.1'
}
```
**For Maven:**
```xml
org.conductoross
conductor-client
5.0.1
```
*Optionally, you can also add spring module for auto configuration*
```xml
org.conductoross
conductor-client-spring
5.0.1
```
## 60-Second Quickstart
**Step 1: Write a worker**
Workers are Java classes that implement the `Worker` interface and poll Conductor for tasks to execute.
```java
public class GreetWorker implements Worker {
@Override
public String getTaskDefName() {
return "greet";
}
@Override
public TaskResult execute(Task task) {
String name = (String) task.getInputData().get("name");
TaskResult result = new TaskResult(task);
result.setStatus(TaskResult.Status.COMPLETED);
result.addOutputData("greeting", "Hello, " + name + "!");
return result;
}
}
```
**Step 2: Run your first workflow app**
Create a `Main.java` with the following:
```java
import io.orkes.conductor.client.ApiClient;
import io.orkes.conductor.client.OrkesClients;
import com.netflix.conductor.client.automator.TaskRunnerConfigurer;
import com.netflix.conductor.common.metadata.workflow.StartWorkflowRequest;
import com.netflix.conductor.sdk.workflow.def.ConductorWorkflow;
import com.netflix.conductor.sdk.workflow.def.tasks.SimpleTask;
import com.netflix.conductor.sdk.workflow.executor.WorkflowExecutor;
import java.util.List;
import java.util.Map;
public class Main {
public static void main(String[] args) {
// Configure the SDK via ApiClient (enterprise-compatible path)
ApiClient apiClient = ApiClient.builder().build();
OrkesClients clients = new OrkesClients(apiClient);
// Create workflow executor
WorkflowExecutor executor = new WorkflowExecutor(apiClient, 100);
// Build and register the workflow
ConductorWorkflow