# Play sound over standard java sinks via pulseaudio to bluetooth device

**URL:** <https://community.openhab.org/t/play-sound-over-standard-java-sinks-via-pulseaudio-to-bluetooth-device/22107>\
**Category:** Off-Topic\
**Tags:** bluetooth, pulseaudio, audiosink\
**Created:** [February 5, 2017, 1:13pm UTC](https://community.openhab.org/t/play-sound-over-standard-java-sinks-via-pulseaudio-to-bluetooth-device/22107 "2017-02-05T13:13:37Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![mstormi](https://community.openhab.org/user_avatar/community.openhab.org/mstormi/32/55857_2.png) [@mstormi](https://community.openhab.org/u/mstormi)\
**Post date:** [February 5, 2017, 3:58pm UTC](https://community.openhab.org/t/play-sound-over-standard-java-sinks-via-pulseaudio-to-bluetooth-device/22107/2 "2017-02-05T15:58:06Z")

</div>

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 …

---

_[View the full topic](https://community.openhab.org/t/play-sound-over-standard-java-sinks-via-pulseaudio-to-bluetooth-device/22107)._
