Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
sun-jdk-1.4.2 and java-config - no worky!
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
tfandango
n00b
n00b


Joined: 08 Nov 2002
Posts: 44

PostPosted: Fri Aug 15, 2003 8:08 pm    Post subject: sun-jdk-1.4.2 and java-config - no worky! Reply with quote

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
View user's profile Send private message
steveb
Advocate
Advocate


Joined: 18 Sep 2002
Posts: 4564

PostPosted: Fri Aug 15, 2003 10:44 pm    Post subject: Reply with quote

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
View user's profile Send private message
tfandango
n00b
n00b


Joined: 08 Nov 2002
Posts: 44

PostPosted: Fri Aug 15, 2003 11:02 pm    Post subject: worked! Reply with quote

Thanks!
Back to top
View user's profile Send private message
steveb
Advocate
Advocate


Joined: 18 Sep 2002
Posts: 4564

PostPosted: Sat Aug 16, 2003 12:05 am    Post subject: Re: worked! Reply with quote

tfandango wrote:
Thanks!
:D
Back to top
View user's profile Send private message
ctaggart
n00b
n00b


Joined: 02 Feb 2003
Posts: 28

PostPosted: Sun Aug 17, 2003 6:24 pm    Post subject: sun-jdk-1.4.2 Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum