I tried doing the same quite a while back but never quite managed to get the BT part to work properly.
I remember it was essential to change /usr/lib/jvm/default-java/jre/lib/sound.properties
.
(the default-java
is actually just a link, depending on packages you have installed or not, multiple directories may exist with a sound.properties
below each, so ensure you edit the one your java is actively using).
Mine reads
javax.sound.sampled.Clip=org.classpath.icedtea.pulseaudio.PulseAudioMixerProvider
javax.sound.sampled.Port=org.classpath.icedtea.pulseaudio.PulseAudioMixerProvider
javax.sound.sampled.SourceDataLine=org.classpath.icedtea.pulseaudio.PulseAudioMixerProvider
javax.sound.sampled.TargetDataLine=org.classpath.icedtea.pulseaudio.PulseAudioMixerProvider
#javax.sound.sampled.Clip=com.sun.media.sound.DirectAudioDeviceProvider
#javax.sound.sampled.Port=com.sun.media.sound.PortMixerProvider
#javax.sound.sampled.SourceDataLine=com.sun.media.sound.DirectAudioDeviceProvider
#javax.sound.sampled.TargetDataLine=com.sun.media.sound.DirectAudioDeviceProvider
so I guess I’m using PulseAudio right now …