java-config --set-user-vm=sun-jdk-1.4.2.02 writes environment variables to $HOME/.gentoo/java, but this file is not read by tcsh. I cannot just include it in my .tcshrc, as it is in bash format, and env-update cannot be run by a non-root user (and I doubt it would fix the problem anyway). Is there a need for a non-root-mode of env-update? Reproducible: Always Steps to Reproduce: 1. Install Suns JDK, then the Blackdown one. Select Blackdown as the systemwide default (to be able to compile openoffice). 2. As a non-root user, run "java-config --set-user-vm=sun-jdk-1.4.2.02" 3. (Optional, it makes no difference) log out, log in again (optionally: run env-update as root, reboot). 4. java -version shows the Blackdown version. 5. print-env | grep -i java also refers to the Blackdown version Actual Results: The Blackdown java was still used Expected Results: The Sun java should have been used instead.
Created attachment 22743 [details, diff] patch against jc_options.py in /usr/lib/python2.2/site-packages/java_config/ java --set-user-vm=xxx now creates ~/.gentoo/java.csh and ~/.gentoo.java-env.csh tcsh users may want to source these files in their .tcshrc file I'm confident that this patch creates valid tcsh syntax and does not break anything for bash users, but you may really want to doublecheck this out.
Thank you for the patch! I'm going to add parts of it to the next release. config_file and config_path where supposed to be used to allow the file that the generated env.d entry was outputed to to change easily -- but aparently I missed actually using those variables.
Added to JAVA_CONFIG_1_1_8 branch.
In versions 1.1.8 and 1.2.0 in portage now.
Thank you very much for fixing this! I emerged 1.1.18 (I suppose that is OK although it is masked) and tried it. It appears to be working.
Your welcome, I'll stabilize 1.1.8 in about a week if I don't any bug reports.
Version 1.1.8 is stable.