Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 139906 - support for per user settings for eseelect java-nsplugin
Summary: support for per user settings for eseelect java-nsplugin
Status: RESOLVED DUPLICATE of bug 148632
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: Java team
Depends on:
Reported: 2006-07-10 10:56 UTC by Guilherme Barile
Modified: 2006-09-22 06:05 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Note You need to log in before you can comment on or make changes to this bug.
Description Guilherme Barile 2006-07-10 10:56:43 UTC
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

Run firefox and check "about:plugins", it will display the java plugin using the 1.4 vm, and no applets will run.
Comment 1 Josh Nichols (RETIRED) gentoo-dev 2006-07-10 11:17:30 UTC
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/

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.
Comment 2 Guilherme Barile 2006-07-10 12:10:11 UTC
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/, and the plugin on /usr/lib/mozilla should link to current_vm/
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?)
Comment 3 Josh Nichols (RETIRED) gentoo-dev 2006-07-10 12:22:28 UTC
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.
Comment 4 Guilherme Barile 2006-07-10 12:28:24 UTC
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.
Comment 5 Josh Nichols (RETIRED) gentoo-dev 2006-09-22 06:05:08 UTC

*** This bug has been marked as a duplicate of 148632 ***