The error happens to me too. Each time i run java-config i have to manualy edit .gentoo/java-env What goes wrong? The System VM is set via env-update and appears in the path. Since the java path is appended and not prepended "which java" returns teh system vm and not the user vm. I've created a patch for the 0.2.8 version. It changes the order, but confuses java-config a bit. Every run of java-config appends a new path. :( --- /usr/bin/java-config 2003-04-09 12:04:05.000000000 +0200 +++ java-config 2003-04-09 11:59:37.000000000 +0200 @@ -209,7 +209,7 @@ ( . $file ; for i in $ENV_VARS ; do if [ $i == "ADDPATH" ] && [ -z "$system" ]; then - echo "PATH=${!i}":\${PATH} + echo "PATH=\${PATH}:${!i}" elif [ $i == "ADDPATH" ] && [ "$system" ]; then echo "PATH=${!i}" echo "ROOTPATH=${!i}"
I changed the ~/.gentoo/java-env file to this, and then sourced it in my ~/.bashrc. It seems to clear it up: --- .gentoo/java-env 2002-10-31 08:02:29.000000000 -0600 +++ .gentoo/java-env.mikeh 2002-11-22 12:49:25.000000000 -0600 @@ -1,10 +1,10 @@ -# Autogenerated by java-config 0.2.5 -# Cmd: /usr/bin/java-config --set-user-vm=sun-jdk-1.4.1.01 -JAVA_HOME=/opt/sun-jdk-1.4.1.01 -CLASSPATH=/opt/sun-jdk-1.4.1.01/lib/rt.jar:. -JDK_HOME=/opt/sun-jdk-1.4.1.01 -JAVAC=/opt/sun-jdk-1.4.1.01/bin/javac -PATH=${PATH}:/opt/sun-jdk-1.4.1.01/bin:/opt/sun-jdk-1.4.1.01/jre/bin +## re-written by mikeh, until they fix java-config +JDK_HOME=`java-config --jdk-home` +JRE_HOME=$JDK_HOME/jre +JAVA_HOME=$JDK_HOME +CLASSPATH=$JRE_HOME/lib/rt.jar:. +JAVAC=$JAVA_HOME/bin/javac +PATH=$JAVA_HOME/bin:$JAVA_HOME/jre/bin:${PATH} if [ -f /home/mikeh/.gentoo/java-env-classpath ] ; then . /home/mikeh/.gentoo/java-env-classpath fi
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.