# io.github.libtmux.Window.Window.rename

- **Module:** io.github.libtmux.Window.Window
- **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/Window.java#L183
- **Page:** https://libtmux.org/en/java/latest/reference/io-github-libtmux-window-window-rename/

```
io.github.libtmux.Window.Window.rename(name: String) -> Window
```

Renames this window and returns its replacement capture.

Retain the result to read the changed name. This handle keeps its original captured state.

A {@code :} or {@code .} is kept as written on every supported release but 3.7, which
refuses the name. A kept delimiter cannot then address the window, since a target splits on
both. Unlike a session name, a window name is never rewritten.
