Force Java (JRE) programs to display Japanese and use Alsa's software mixer (on Slackware)

  1. Roger Meyer, February 2007 showed me the easy way to make Java display Japanese: create /usr/lib/java/lib/fonts/fallback and put your favorite Japanese TTF in that folder (why Java doesn't simply use the system fonts is beyond me :-\).
  2. Oliver1974 on the jmonkeyengine.org forum helped me keep sound mixing with Java (in it's natural state, Java more often than not prevents other apps from using sound).

    According to Oliver1974 Java starts by using Alsa and then checks whether your soundcard is capable of hardware mixing. If it's not, Java does not use Alsa's software mixer (dmix), but drops Alsa all together and turns to that obsolete sound system that is OSS! Fun time!

    The solution is to start your Java application with aoss (the wrapper script for the Alsa OSS compatibility lib). For example, I wanted to use Panda's gGo. Its startup script has

     /usr/lib/java/bin/java -jar /home/[my username]/bin/ggo/lib/gGo.jar $@
    I changed that to
    /usr/bin/aoss /usr/lib/java/bin/java -jar /home/[my username]/bin/ggo/lib/gGo.jar $@

Wed Jul 20 15:12:30 CEST 2011 (used on Slackware 13)