I\'m trying to to use Java Sound API in a Scala SBT-managed project.
Here is a toy app that plays a note.
import javax.sound.midi._
object MyMain ex
SBT runs your application in-process, with some classloader magic, which probably prevents MidiSystem
from finding (using SPI) the sound components.
You can try forking a new JVM to run your application: fork in run := true
. See Forking in the documentation.
Note that:
by default it does not redirect input to the application. You can add that with:
connectInput in run := true
kill
or any kind of task manager)