You are not logged in.

#1 2010-09-29 18:19:28

InterArmaEnimSil
Member
Registered: 2010-09-23
Posts: 4

No Sound in Java Applets

I recently installed Arch, switching from Ubuntu,and so far pretty much everything is going as expected.  The one issue I have at the moment is a lack of any sound whatsoever in Java applets.  Sound works in all other contexts, including flash, perfectly.  I am using the sun java implementation, and alsa as my sound server.  Any suggestions as to fixes, or even simply where to look to find fixes, would be greatly appreciated.  A decent bit of searching on my part revealed fixes for similar problems (ie, conflicting sound with other programs) and solutions that were specific to gnome, etc.  Thanks to everyone in advance.

Offline

#2 2010-09-29 21:00:01

doorknob60
Member
Registered: 2008-09-29
Posts: 403

Re: No Sound in Java Applets

I should probably make a wiki article (or ad to the Java wiki article) about this, since it seems to come up quite often (especially on Ubuntu forums, actually). The only good solution I've found is to use Pulseaudio, and rename the java executable to java.bin, and make a script called java in the same folder, and put this in the script:

#!/bin/sh
padsp /opt/java/jre/bin/java.bin "$@"

By the way, the path to the java executable is /opt/java/jre/bin/ I've tried using the same method with plain ALSA by using aoss, and it works sorta, but it causes random crashes of Java, so that's a no go, have to use Pulse.

Offline

#3 2010-09-29 23:15:06

InterArmaEnimSil
Member
Registered: 2010-09-23
Posts: 4

Re: No Sound in Java Applets

Thanks for the quick feedback.  So far, no luck.  I installed pulseaudio by following a subset of the steps at:
http://wiki.archlinux.org/index.php/PulseAudio
Namely...
1)# pacman -S pulseaudio
2)# pacman -S alsa-plugins
3)# pacman -S pulseaudio-alsa
4)#mv /opt/java/jre/bin/java /opt/java/jre/bin/java.bin
...Then copied the script into the old location of the executable.
No effect thus far.  I'm guessing I need to modify a configuration, set up pulse to start as a daemon or something similar...did I miss a step here?
Thank you once again!

Offline

#4 2010-09-30 00:34:37

doorknob60
Member
Registered: 2008-09-29
Posts: 403

Re: No Sound in Java Applets

I think you need to run start-pulseaudio-x11 in your autostart (.xinitrc, Openbox autostart script, Gnome autostart thing, wherever works for your setup I guess) so Pulseaudio starts up.

Last edited by doorknob60 (2010-09-30 00:35:02)

Offline

#5 2010-09-30 02:00:28

InterArmaEnimSil
Member
Registered: 2010-09-23
Posts: 4

Re: No Sound in Java Applets

sad No luck.  I added...
exec start-pulseaudio-x11
to my ./xinitrc, right after the line that starts lxde.  When I run alsamixer, I see that pulseaudio is running...but the sound issue still remains with applets.  I don't suppose sitting tight and waiting or updates to fix the issue more directly is a practical option...

Offline

Board footer

Powered by FluxBB