# io.github.libtmux.SplitSpec.SplitSpec.Builder.running

- **Module:** io.github.libtmux.SplitSpec.SplitSpec.Builder
- **Package:** io.github.libtmux:libtmux
- **Language:** Java
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-java/blob/842228310449e879ebcaa3f910597757c9dbffd6/libtmux/src/main/java/io/github/libtmux/SplitSpec.java#L338
- **Page:** https://libtmux.org/en/java/latest/reference/io-github-libtmux-splitspec-splitspec-builder-running/

```
io.github.libtmux.SplitSpec.SplitSpec.Builder.running(String...) -> Builder
```

Runs a command, which closes the pane when it exits unless {@link #keepOnExit} is set.

A command that exits fast enough races {@link Pane#split}'s own read-back: tmux can
destroy the pane before the second listing that confirms it runs, and the split then
throws {@code ObjectDoesNotExistException} even though tmux made the pane and ran the
command in it. {@link #keepOnExit} removes the race by keeping the pane there to be read.
