maxim wexler wrote:
--- Chad Feller <[EMAIL PROTECTED]> wrote:
methinks java is not in your path. if you type:
"which java"
does it return anything? that failing find out
where it (java) is on
your system. something like this should help:
"locate javac | grep bin"
(I chose javac instead of java as you shouldn't get
a mile of output,
but likewise you could do a "locate java" instead -
nevertheless they
should be in the same place). if locate returns
something, then take a
peek at your path ("echo $PATH") and that should
reveal your problem.
[EMAIL PROTECTED] ~ $ which java
which: no java in (/usr/local/bin:/usr/bin:/bin)
[EMAIL PROTECTED] ~ $ locate javac | grep bin
/opt/blackdown-jdk-1.4.2.02/bin/javac
[EMAIL PROTECTED] ~ $ echo $PATH
/usr/local/bin:/usr/bin:/bin
Hey, you're right! How'd that happen? I wonder does
this have something to do with an emerge -C openssh?
Before it ran it warned me that openssh was part of my
profile and could cause me problems. But java? Too weird!
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
So we have to get Java back into your path... I've got Sun Java, so mine
will be slightly different than yours, but in your /etc/env.d/ and
/etc/env.d/java directory you should have a couple of files in there.
First you will have something like /etc/env.d/java/20sun-jdk-1.4.2.10.
Each file in /etc/env.d/java/ represents each version of java you have
installed on your system (thus you could have multiple versions and
switch between them). my /etc/env.d/java/20sun-jdk-1.4.2.10 contains
the following.
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header:
/var/cvsroot/gentoo-x86/dev-java/sun-jdk/files/sun-jdk-1.4.2.10,v 1.2
2006/01/08 23:27:53 nichoj Exp $
VERSION="Sun JDK 1.4.2.10"
JAVA_HOME=/opt/sun-jdk-1.4.2.10
JDK_HOME=/opt/sun-jdk-1.4.2.10
JAVAC=${JAVA_HOME}/bin/javac
ADDPATH="${JAVA_HOME}/bin:${JAVA_HOME}/jre/bin:${JAVA_HOME}/jre/javaws"
ADDLDPATH="${JAVA_HOME}/jre/lib/i686/:${JAVA_HOME}/jre/lib/i686/native_threads/:${JAVA_HOME}/jre/lib/i686/client/:${JAVA_HOME}/jre/lib/i686/server/"
MANPATH="/opt/sun-jdk-1.4.2.10/man"
ENV_VARS="JAVA_HOME JDK_HOME JAVAC ADDPATH ADDLDPATH MANPATH"
You should also have something like /etc/env.d/20java This would be the
version of java you currently have set (active). In my case, because I
only have one java installed, it will largely be the same. its contents
are:
# Autogenerated by java-config
# Command: --set-system-vm=sun-jdk-1.4.2.10
JDK_HOME=/opt/sun-jdk-1.4.2.10
JAVAC=/opt/sun-jdk-1.4.2.10/bin/javac
PATH="/opt/sun-jdk-1.4.2.10/bin:/opt/sun-jdk-1.4.2.10/jre/bin:/opt/sun-jdk-1.4.2.10/jre/javaws"
ROOTPATH="/opt/sun-jdk-1.4.2.10/bin:/opt/sun-jdk-1.4.2.10/jre/bin:/opt/sun-jdk-1.4.2.10/jre/javaws"
LDPATH="/opt/sun-jdk-1.4.2.10/jre/lib/i686/:/opt/sun-jdk-1.4.2.10/jre/lib/i686/native_threads/:/opt/sun-jdk-1.4.2.10/jre/lib/i686/client/:/opt/sun-jdk-1.4.2.10/jre/lib/i686/server/"
# VERSION="Sun JDK 1.4.2.10"
MANPATH=${MANPATH}:/opt/sun-jdk-1.4.2.10/man
JAVA_HOME=/opt/sun-jdk-1.4.2.10
Now if you have a file in /etc/env.d/java/<something> but don't have an
/etc/env.d/20java (or if you do, it is empty), then you should be able
to fix that with java-config (man java-config). However if both files
/etc/env.d/java/<something> and /etc/env.d/20java seem legit, then we
need to see why bash isn't sourcing the env.d files. In fact now that I
think about it, that might be your problem, as your path did seem to be
quite short. Mine for instance is:
echo $PATH
/usr/lib/ccache/bin:/usr/local/bin:/usr/bin:/bin:/opt/bin:/usr/i686-pc-linux-gnu/gcc-bin/3.4.5:/opt/sun-jdk-1.4.2.10/bin:/opt/sun-jdk-1.4.2.10/jre/bin:/opt/sun-jdk-1.4.2.10/jre/javaws:/usr/qt/3/bin:/usr/games/bin
Before I start speculating any further, let me know where the above
leads you...
--
gentoo-user@gentoo.org mailing list