View previous topic :: View next topic |
Author |
Message |
db_404 Guru
Joined: 05 Dec 2002 Posts: 336
|
Posted: Mon Dec 09, 2002 2:17 pm Post subject: Java and profile.env |
|
|
During my install, something required java to be installed - it installed the blackdown jre. Now I need to use Sun j2sdk 1.41 so I decided to go it alone and just unmerge the jre and java-config and install Java 1.4 into /opt outside of portage controll.
However env-update is still populating my profile.env with JAVA_HOME and other JAVA related variables - all of which point to the now unmerged blackdown JRE.
What needs to be done to remove the remnants of the previous JRE. There are no pending config updates, so it must be something still on the filesystem somewhere - but where do I start looking?
Thanks.
David. |
|
Back to top |
|
|
pjp Administrator
Joined: 16 Apr 2002 Posts: 20067
|
Posted: Mon Dec 09, 2002 6:32 pm Post subject: |
|
|
Post-installation question, moved from Installing Gentoo.
Forums front page wrote: | Installing Gentoo
If you've finished the install guide, look somewhere else. But if you're still working your way through it, or just need some info before you start your install, this is the place. |
_________________ Quis separabit? Quo animo? |
|
Back to top |
|
|
db_404 Guru
Joined: 05 Dec 2002 Posts: 336
|
Posted: Tue Dec 10, 2002 3:45 pm Post subject: |
|
|
OK - Updating my own question.
Found the key - /usr/bin/java-config - which is the script that digs around in various /etc/env.d/java files to setup the system vm config.
I think if I can find what a vailid /etc/env.d/java/*** file looks like I'll be
set - I don't really want to have to DL a vm just to find this out, so if someone will paste one here for me that would be great.
I shold then be able to set up a system vm that java-config will like, and portage will be none the wiser that a VM has been installed outside of it's control.
Thanks,
David. |
|
Back to top |
|
|
fyerk Apprentice
Joined: 17 Sep 2002 Posts: 212 Location: Atlanta, GA
|
Posted: Tue Dec 10, 2002 3:58 pm Post subject: |
|
|
I have three files that may be of interest.
First, /etc/env.d/20java
Code: |
# Autogenerated by java-config 0.2.5
# Cmd: /usr/bin/java-config --set-system-vm=blackdown-jdk-1.3.1
JAVA_HOME=/opt/blackdown-jdk-1.3.1
CLASSPATH=/opt/blackdown-jdk-1.3.1/jre/lib/rt.jar:.
JDK_HOME=/opt/blackdown-jdk-1.3.1
JAVAC=/opt/blackdown-jdk-1.3.1/bin/javac
PATH=/opt/blackdown-jdk-1.3.1/bin:/opt/blackdown-jdk-1.3.1/jre/bin
ROOTPATH=/opt/blackdown-jdk-1.3.1/bin:/opt/blackdown-jdk-1.3.1/jre/bin
LDPATH=/opt/blackdown-jdk-1.3.1/jre/lib/i386/:/opt/blackdown-jdk-1.3.1/jre/lib/i386/native_threads/
MANPATH=/opt/blackdown-jdk-1.3.1/man
|
Second, /etc/env.d/java/20blackdown-jdk-1.3.1
Code: |
# Copyright 1999-2002 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License, v2 or later
# Author: Karl Trygve Kalleberg
# Maintainer: Tools Team <tools@gentoo.org>
# $Header: /home/cvsroot/gentoo-x86/dev-java/blackdown-jdk/files/blackdown-jdk-1.3.1,v 1.8 2002/09/06 21:24:34 owen Exp $
VERSION="Blackdown JDK 1.3.1"
JAVA_HOME=/opt/blackdown-jdk-1.3.1
CLASSPATH=/opt/blackdown-jdk-1.3.1/jre/lib/rt.jar:.
JDK_HOME=/opt/blackdown-jdk-1.3.1
JAVAC=${JAVA_HOME}/bin/javac
ADDPATH="${JAVA_HOME}/bin:${JAVA_HOME}/jre/bin"
ADDLDPATH="/opt/blackdown-jdk-1.3.1/jre/lib/i386/:/opt/blackdown-jdk-1.3.1/jre/lib/i386/native_threads/"
MANPATH=/opt/blackdown-jdk-1.3.1/man
ENV_VARS="JAVA_HOME CLASSPATH JDK_HOME JAVAC ADDPATH ADDLDPATH MANPATH"
|
And lastly, /etc/env.d/java/20blackdown-jre-1.3.1
Code: |
# Copyright 1999-2002 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License, v2 or later
# Author: Karl Trygve Kalleberg
# Maintainer: Tools Team <tools@gentoo.org>
# $Header: /home/cvsroot/gentoo-x86/dev-java/blackdown-jre/files/blackdown-jre-1.3.1,v 1.4 2002/07/16 21:52:28 karltk Exp $
VERSION="Blackdown JRE 1.3.1"
JAVA_HOME=/opt/blackdown-jre-1.3.1
CLASSPATH=/opt/blackdown-jre-1.3.1/lib/rt.jar
JRE_HOME=/opt/blackdown-jre-1.3.1
ADDPATH="${JAVA_HOME}/bin"
ADDLDPATH="/opt/blackdown-jre-1.3.1/lib/"
MANPATH=/opt/blackdown-jre-1.3.1/man
ENV_VARS="JAVA_HOME CLASSPATH JRE_HOME ADDPATH ADDLDPATH MANPATH"
|
Hope this helps. _________________ -David |
|
Back to top |
|
|
db_404 Guru
Joined: 05 Dec 2002 Posts: 336
|
Posted: Tue Dec 10, 2002 4:16 pm Post subject: |
|
|
Thanks, now it's working.
OK the way to do this is to:
1. Make sure java-config is merged
2. Download your favorite vm and install somewhere (/opt is good)
3. Setup a 'system-vm' file - in /etc/env.d/java - it needs to look like one of the files posted above. Call it 20<my-java-name> (where obviously <my-java-name> is some ID you specify. Edit it to point to the appropriate places
4. Run java-config --set-system-vm=<my-java-name> This is what generates the /etc/env.d/20java file
5. Run env-update, Logout/login and you should be good to go
You may need to do something to fake out portage that you have a valid jdk installed (how do you do that?). Or use --nodeps a lot....
I've just managed to install ant and jedit using the above approach.
Thanks for the files.
David |
|
Back to top |
|
|
|