I was running java-config via sudo and found that it failed at line 173. It failed because the shell script 'env-update' was not in the path. I noticed that it was in the directory of /usr/sbin. So changing it from 'env-update' to '/usr/sbin/env-update' worked. Reproducible: Always Steps to Reproduce: 1. sudo java-config --set-system-vm=blackdown-jdk-1.4.1 (normal user with neither /sbin or /usr/sbin in the PATH environment variable) Actual Results: storri@firewall linux-2.4.20-gentoo-r5 $ sudo java-config --set-system-vm=blackdown-jdk-1.4.1 Now using Blackdown JDK 1.4.1 (/etc/env.d/java/20blackdown-jdk-1.4.1) * You should login again to make your java-config changes available /usr/bin/java-config: line 173: env-update: command not found * Or, you can type 'source /etc/profile' in your current session. Expected Results: storri@firewall linux-2.4.20-gentoo-r5 $ sudo java-config --set-system-vm=blackdown-jdk-1.4.1 Now using Blackdown JDK 1.4.1 (/etc/env.d/java/20blackdown-jdk-1.4.1) * You should login again to make your java-config changes available >>> Regenerating /etc/ld.so.cache... * Or, you can type 'source /etc/profile' in your current session.
This happens with java-config-1.1.4 ??
Is that a question for me to answer? The latest java-config that is available via the portage system is 1.1.2. I updated to the newest version and this is what happened. storri@base storri $ sudo java-config --set-system-vm=blackdown-jdk-1.4.1 System VM set You may want to update your enviroment by running: "/usr/sbin/env-update && source /etc/profile" I then did: bash-2.05b$ sudo /usr/sbin/env-update >>> Regenerating /etc/ld.so.cache... * Caching service dependencies... [ ok ] bash-2.05b$ source /etc/profile storri@base storri $ java-config -v java version "1.4.1" Java(TM) 2 Runtime Environment, Standard Edition (build Blackdown-1.4.1-01) Java HotSpot(TM) Client VM (build Blackdown-1.4.1-01, mixed mode) The jvm before was Blackdown-jdk-1.4.1. I know the update did not do anything specifically but the command to set the jvm not appears to work.
java-config 1.1.4 is the latest available on the portage tree, can you test it, and tell if this is happening ?
The program works. I get two entries for JVMs though. bash-2.05b$ sudo java-config -L [blackdown-jre-1.4.1] "Blackdown JRE 1.4.1" (/etc/env.d/java/20blackdown-jre-1.4.1) [blackdown-jdk-1.4.1] "Blackdown JDK 1.4.1" (/etc/env.d/java/20blackdown-jdk-1.4.1) *
Done, then closing it.