Gimme the 411
Gimme the 411

Reputation: 1044

How do I quit sbt run correctly?

After sbt run, a project I'm working on is showing some errors/warnings, and seems to pause.

How do I quit sbt from here?

If I press ctrl+z or ctrl+c, it stops, but the next time I run sbt it says:

[warn] sbt server could not start because there's another instance of sbt running on this build.

Running multiple instances is unsupported

So how do I (force?) quit correctly after sbt run?

Upvotes: 4

Views: 4131

Answers (2)

Nunchucks
Nunchucks

Reputation: 1230

Since the comments on the accepted answer say it didn't work for you I'll offer another workaround.

You can always kill running instances of sbt server by looking for java processes (SBT runs within the JVM) and killing them.

pgrep -a java to list PIDs of all java processes.

kill -9 {PID} to kill a process by PID.

Or just open Activity Monitor/Resource Monitor and kill process with Process Name "java".

Upvotes: 4

amer
amer

Reputation: 1682

In build.sbt:

fork in run := true

Upvotes: 5

Related Questions