# io.github.libtmux.scaladsl.cats.Server.fromJava

- **Module:** io.github.libtmux.scaladsl.cats
- **Package:** io.github.libtmux:libtmux-scala_3
- **Language:** Scala
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-java/blob/f56392b5d9bc7f1f9c1631842333fb90f3d82d40/libtmux-scala-cats/src/main/scala/io/github/libtmux/scaladsl/cats/Server.scala#L66
- **Page:** https://libtmux.org/en/scala/latest/reference/io-github-libtmux-scaladsl-cats-server-fromjava/

```
def fromJava[F[_]: Async](
      java: JavaServer,
      maxConcurrentCalls: Int = 4
  ): Resource[F, Server[F]]
```

Borrows Java without closing it. The bound covers this facade only; transport capacity and interruption remain the owner's responsibility.

`direct.Server` is opaque, so a borrowed handle and an owned one are the
same runtime object. Release here tears down only this scope's own
`Execution` (its semaphores and supervised fibers); it never calls
`close()` on the borrowed handle, which is `resource`'s job alone.

## Parameters

- `java` (`JavaServer`)
- `maxConcurrentCalls` (`Int`)
