# Java

Source: https://libtmux.org/en/java/latest/

> libtmux for Java, version latest.

![](https://libtmux.org/en/brand/java/library/logo.svg)

Drive a real tmux from Java.

io.github.libtmux:libtmux

You are reading the **latest** documentation. Use the version control in the header to move between releases, or the port dropdown to find a corresponding page in another language.

## Install

### Library `io.github.libtmux:libtmux`

```kotlin
dependencies {
    implementation(platform("io.github.libtmux:libtmux-bom:0.0.1-alpha.12"))

    implementation("io.github.libtmux:libtmux")
    testImplementation("io.github.libtmux:libtmux-junit5")
}
```

The platform BOM names the version once and every other coordinate follows it, which is what stops a project mixing two releases of modules built against each other.

### [Workspace Manager](https://libtmux.org/en/java/latest/workspace/) `libtmux-workspace-cli`

The workspace package is separate from the core library.

```console
$ ./gradlew \
    --max-workers=2 \
    --no-parallel \
    :libtmux-workspace-cli:installDist
```

Run from a libtmux-java checkout with JDK 25 or newer. The launcher is libtmux-workspace-cli/build/install/tmux-workspace/bin/tmux-workspace; keep its adjacent libraries.

### [MCP](https://libtmux.org/en/java/latest/mcp/) `libtmux-mcp`

Choose your client and configuration scope, then run the command or paste the configuration.

Build or install the server first:

```console
$ ./gradlew :libtmux-mcp:installDist
```

Then register:

```console
$ claude mcp add tmux -- /absolute/path/to/libtmux-mcp
```

Nothing publishes this server as a binary yet. The build writes a launcher at libtmux-mcp/build/install/libtmux-mcp/bin/libtmux-mcp; use its absolute path.

Config file: `~/.claude.json (this project)`

### [Topics](https://libtmux.org/en/java/latest/topics/)

[Subject-by-subject, with Java in every code block.](https://libtmux.org/en/java/latest/topics/)

### [Guides](https://libtmux.org/en/java/latest/guides/)

[Task guides for Java.](https://libtmux.org/en/java/latest/guides/)

### [Examples](https://libtmux.org/en/java/latest/examples/)

[Complete programs, sourced from the code each port tests.](https://libtmux.org/en/java/latest/examples/)

### [Concepts](https://libtmux.org/en/java/latest/concepts/)

[The domain model every port shares.](https://libtmux.org/en/java/latest/concepts/)

## Packages and integrations

### [Workspace Manager](https://libtmux.org/en/java/latest/workspace/)

[Build the CLI from source and load workspace files with tmux-workspace load.](https://libtmux.org/en/java/latest/workspace/)

### [MCP](https://libtmux.org/en/java/latest/mcp/)

[In development. Connect an MCP client to tmux tools and inspect the server API.](https://libtmux.org/en/java/latest/mcp/)

## API references

### [Official reference](https://libtmux.org/en/java/latest/reference/)

[Java API signatures and documentation, with links to related guides and APIs in other languages.](https://libtmux.org/en/java/latest/reference/)

### [javadoc.io documentation](https://javadoc.io/doc/io.github.libtmux/libtmux)

[Java API documentation from the Javadoc JAR published to Maven Central.](https://javadoc.io/doc/io.github.libtmux/libtmux)

[All Java versions and install instructions](https://libtmux.org/en/java/)
