I ran into this issue today, when using pipewire, JAVA will not be able to produce any sound. In order to get sound in java running I needed to install lib32-openal, create a file: /etc/openal/alsoft.conf and add the line driver=alsa. This is not an intuitive process and many less experienced users will not be able to solve this.
This is especially annoying for people who would like to play java-based games (e.g. minecraft) as it seems very surprising that all audio works, except the game audio.
PS: I recently changed from ubuntu and oh man, I really like this OS and the AUR store
Interesting, I have never needed to install or configure that to get sound in java.
@pixartist Can you tell us was the issue with all sounds or perhaps just the music (I think they still use midi files in old java minecraft)? Also, can you provide some details on your hardware (sound card and are you connected via an audio jack, hdmi, or displayport)?
In any case, I want to thank you for providing a solution. Often, people come onto a site pointing out a problem, one that they fixed for themselves, but seldom follow it up with a resolve for others. - I respect that you did so.
No sound was available at all, also the java app did not appear in the volume control app as a playback application. The audio device options in the game were “System default” and “Jack”. Btw I am not the only person with this issue, see:
I am using the cloud alpha → usb audio. But considering java did not appear as a sound producer, I assume I would have had no audio either way.