When forcing a user vm for the generation-2 java config using the workaround described on the java upgrade page, the java nsplugin keeps pointing to the system vm version, rendering it unusable. To reproduce: Set sun-jdk-1.5 as the user vm (the system vm for generation 1 will always be a 1.4 vm), apply the workaround mentioned on the java upgrade guide on a user's .bashrc: if [[ -L $HOME/.gentoo/java-config-2/current-user-vm ]]; then export JAVA_HOME=$HOME/.gentoo/java-config-2/current-user-vm elif [[ -L /etc/java-config-2/current-system-vm ]]; then export JAVA_HOME=/etc/java-config-2/current-system-vm fi Run firefox and check "about:plugins", it will display the java plugin using the 1.4 vm, and no applets will run.
It really isn't possible (afaik) to have the system's java plugin be changed along with the system vm. This is because the plugin is a file that lives in /usr/lib/nsbrowser/plugins/java-plugin.so. This used to be copied here if you emerge a jdk/jre with USE=nsplugin, but was recently changed because it causes file collisions when you emerge more than one. You also can't have this point at something under /etc/java-config-2/current-system-vm because plugins could feasibly be at different file names, or not even be available . So instead, we have an eselect module, java-nsplugin, to manage the current system java plugin. It doesn't currently let you define a per user plugin, because I think it's a bit trickier to manage than the system one.
shouldn't the plugin be set when you set the system-vm then ? maybe the jdk/jre ebuilds should create a link to its plugin in JAVA_HOME/plugin.so, and the plugin on /usr/lib/mozilla should link to current_vm/plugin.so I don't think it's a problem (at least for firefox) if the link is dead, so, it wouldn't be a problem if the current vm doesn't provide a plugin at all (is there any vm that doesn't provide a plugin anyway?)
Sun doesn't provide one for amd64. Kaffe doesn't provide one. Jrockit doesn't provide one. I'm pretty sure the way it is now is slighty better than your suggestion, because the java plugin should always work, regardless of what your system vm is. Perhaps it may make sense that, if the system vm has a plugin installed, it might set the system nsplugin too. That might be a little tricky to implement though with the way things are atm.
If you have two users, and system-vm is 1.4 User1 vm is 1.4 User2 vm is 1.5 If you set java-plugin to 1.4, it won't work for User2. If you set the java-plugin to 1.5, it won't work for User1.
*** This bug has been marked as a duplicate of 148632 ***