Same problem in ubuntu 12.04 with GNOME as UI. But I found that I can switch layout by changing the order of layouts in the Keyboard Layout Settings -> Layouts.
vasiliy@vasiliy-desktop:~$ java -showversion java version "1.6.0_24" OpenJDK Runtime Environment (IcedTea6 1.11.3) (6b24-1.11.3-1ubuntu0.12.04.1) OpenJDK 64-Bit Server VM (build 20.0-b12, mixed mode) -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/238859 Title: Can't switch keyboard layout using java applications To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/sun-java6/+bug/238859/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs