java don't outputs sound to pulse audio by default
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Raspbian |
New
|
Undecided
|
Unassigned |
Bug Description
package: openjdk-17-jre
steps to reproduce
write a clean raspberry pi os bullseye image
update all packages
install pulseaudio and openjdk-17-jre
use any java application which uses java sound api for playback
when playback is running, call pactl list sink-inputs
expected behavior:
sink input should be in the list
actual behavior:
nothing in the returned list
an other way to demonstrate this is to connect any bluetooth headphones and try to play sound from java
expected:
sound should go through the bluetooth device
actual:
sound go through the standard audio jack
it is not working because Java ignores pulse and sends it's output to alsa directly
possible fix:
append the following lines to /etc/java-
javax.sound.
javax.sound.
javax.sound.
javax.sound.
it fixes the problem, but I don't understand why
java 17 from the repository, raspberry pi os bullseye 64 bit, raspberry pi 4 model b