Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Java and profile.env
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
db_404
Guru
Guru


Joined: 05 Dec 2002
Posts: 336

PostPosted: Mon Dec 09, 2002 2:17 pm    Post subject: Java and profile.env Reply with quote

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


Joined: 16 Apr 2002
Posts: 20067

PostPosted: Mon Dec 09, 2002 6:32 pm    Post subject: Reply with quote

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


Joined: 05 Dec 2002
Posts: 336

PostPosted: Tue Dec 10, 2002 3:45 pm    Post subject: Reply with quote

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


Joined: 17 Sep 2002
Posts: 212
Location: Atlanta, GA

PostPosted: Tue Dec 10, 2002 3:58 pm    Post subject: Reply with quote

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


Joined: 05 Dec 2002
Posts: 336

PostPosted: Tue Dec 10, 2002 4:16 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo 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