View previous topic :: View next topic |
Author |
Message |
tfandango n00b
Joined: 08 Nov 2002 Posts: 44
|
Posted: Fri Aug 15, 2003 8:08 pm Post subject: sun-jdk-1.4.2 and java-config - no worky! |
|
|
Hi-
I downloaded 1.4.2 into /usr/portage/distfiles and ran the ebuild which unpacked it and installed it in /opt/sun-jdk-1.4.2/. Then it deleted the older version of java I was using (autoclean is set to yes).
Now my problem is that java-config is still pointing to the old version (which has been erased) and the new version doesn't show up in java-config --list-available-vms. In fact, nothing shows up at all, however, I can verify that the proper files are there. What do i need to do to get this thing to recognise the correct jvm?
Thanks,
troy |
|
Back to top |
|
|
steveb Advocate
Joined: 18 Sep 2002 Posts: 4564
|
Posted: Fri Aug 15, 2003 10:44 pm Post subject: |
|
|
do this: Code: | mkdir -p /etc/env.d/java/
cat << EOF > /etc/env.d/java/20sun-jdk-1.4.2
# Copyright 1999-2003 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License, v2 or later
# Author: Karl Trygve Kalleberg
VERSION="Sun JDK 1.4.2"
JAVA_HOME=/opt/sun-jdk-1.4.2
CLASSPATH=.:/opt/sun-jdk-1.4.2/jre/lib:/opt/sun-jdk-1.4.2/lib/tools.jar
JDK_HOME=/opt/sun-jdk-1.4.2
JAVAC=\${JAVA_HOME}/bin/javac
ADDPATH="\${JAVA_HOME}/bin:\${JAVA_HOME}/jre/bin:\${JAVA_HOME}/jre/javaws"
ADDLDPATH="/opt/sun-jdk-1.4.2/jre/lib"
MANPATH="/opt/sun-jdk-1.4.2/man"
ENV_VARS="JAVA_HOME CLASSPATH JDK_HOME JAVAC ADDPATH ADDLDPATH MANPATH"
EOF
env-update
java-config --list-available-vms
java-config --set-system-vm=sun-jdk-1.4.2
source /etc/profile
java-config --list-available-vms |
cheers
SteveB |
|
Back to top |
|
|
tfandango n00b
Joined: 08 Nov 2002 Posts: 44
|
Posted: Fri Aug 15, 2003 11:02 pm Post subject: worked! |
|
|
Thanks! |
|
Back to top |
|
|
steveb Advocate
Joined: 18 Sep 2002 Posts: 4564
|
Posted: Sat Aug 16, 2003 12:05 am Post subject: Re: worked! |
|
|
|
|
Back to top |
|
|
ctaggart n00b
Joined: 02 Feb 2003 Posts: 28
|
Posted: Sun Aug 17, 2003 6:24 pm Post subject: sun-jdk-1.4.2 |
|
|
I ran into the same problem. I was using sun-jdk-1.4.1 and after running "emerge -u dev-java/sun-jdk" to upgrade to 1.4.2, the system-vm wasn't setup correctly. It still pointed to 1.4.1 and no VM's were listed when running "java-config --list-available-vms". The "/etc/env.d/java/20sun-jdk-1.4.2" file was already setup correctly, but the system vm doesn't get set by the ebuild. Here is all that I had to run from your post.
Code: |
env-update
java-config --list-available-vms
java-config --set-system-vm=sun-jdk-1.4.2
source /etc/profile
java-config --list-available-vms
|
Thanks for posting a solution. |
|
Back to top |
|
|
|