The ~/.gentoo/java-env file generated by java-config 0.2.8 --set-user-vm appends to the end of $PATH, which already has the system vm from /etc/profile.env. It should use something like PATH=$(echo $PATH | perl -pe "s|`grep ^PATH /etc/env.d/20java | cut -f2- -d=`|_newpath_|") where _newpath_ is the PATH= for the vm selected by --set-user-vm Also, the CLASSPATH is wrong; it lacks the contents of /etc/env.d/30java-finalclaspath (it probably needs to be set using the same method, which will work fine even if something else in /etc/env.d sets the CLASSPATH). The syntax I gave is full of bashisms, so probably can't be used as-is. Reproducible: Always Steps to Reproduce: 1.Install two different jdks 2.Set the system vm to one of them 3.Try to set the user vm to another one Actual Results: $HOME/.gentoo/java-env is created which appends to the PATH and replaces the CLASSPATH with something which does not end in :. Expected Results: $HOME/.gentoo/java-env which replaces the part of $PATH pointing to the system vm with the right value for the user vm and replaces the part of $CLASSPATH added by the system vm with the one added by the user vm. Other variables might need the same treatment. The java-config version is 0.2.8 This bug makes --set-user-vm next to useless
Im not having enough time to work on gentoo NOW, i can help on these later.
Fixed on java-config CVS, will be available in java-config 1.1.5. Reopen if you have problems.