1 |
maxim wexler wrote: |
2 |
> --- Chad Feller <cfeller@××××××××××.edu> wrote: |
3 |
> |
4 |
> |
5 |
>> methinks java is not in your path. if you type: |
6 |
>> |
7 |
>> "which java" |
8 |
>> |
9 |
>> does it return anything? that failing find out |
10 |
>> where it (java) is on |
11 |
>> your system. something like this should help: |
12 |
>> |
13 |
>> "locate javac | grep bin" |
14 |
>> |
15 |
>> (I chose javac instead of java as you shouldn't get |
16 |
>> a mile of output, |
17 |
>> but likewise you could do a "locate java" instead - |
18 |
>> nevertheless they |
19 |
>> should be in the same place). if locate returns |
20 |
>> something, then take a |
21 |
>> peek at your path ("echo $PATH") and that should |
22 |
>> reveal your problem. |
23 |
>> |
24 |
>> |
25 |
> |
26 |
> heathen@sarawak ~ $ which java |
27 |
> which: no java in (/usr/local/bin:/usr/bin:/bin) |
28 |
> heathen@sarawak ~ $ locate javac | grep bin |
29 |
> /opt/blackdown-jdk-1.4.2.02/bin/javac |
30 |
> heathen@sarawak ~ $ echo $PATH |
31 |
> /usr/local/bin:/usr/bin:/bin |
32 |
> |
33 |
> Hey, you're right! How'd that happen? I wonder does |
34 |
> this have something to do with an emerge -C openssh? |
35 |
> Before it ran it warned me that openssh was part of my |
36 |
> profile and could cause me problems. But java? Too weird! |
37 |
> |
38 |
> __________________________________________________ |
39 |
> Do You Yahoo!? |
40 |
> Tired of spam? Yahoo! Mail has the best spam protection around |
41 |
> http://mail.yahoo.com |
42 |
> |
43 |
So we have to get Java back into your path... I've got Sun Java, so mine |
44 |
will be slightly different than yours, but in your /etc/env.d/ and |
45 |
/etc/env.d/java directory you should have a couple of files in there. |
46 |
First you will have something like /etc/env.d/java/20sun-jdk-1.4.2.10. |
47 |
Each file in /etc/env.d/java/ represents each version of java you have |
48 |
installed on your system (thus you could have multiple versions and |
49 |
switch between them). my /etc/env.d/java/20sun-jdk-1.4.2.10 contains |
50 |
the following. |
51 |
|
52 |
# Copyright 1999-2004 Gentoo Foundation |
53 |
# Distributed under the terms of the GNU General Public License v2 |
54 |
# $Header: |
55 |
/var/cvsroot/gentoo-x86/dev-java/sun-jdk/files/sun-jdk-1.4.2.10,v 1.2 |
56 |
2006/01/08 23:27:53 nichoj Exp $ |
57 |
|
58 |
VERSION="Sun JDK 1.4.2.10" |
59 |
JAVA_HOME=/opt/sun-jdk-1.4.2.10 |
60 |
JDK_HOME=/opt/sun-jdk-1.4.2.10 |
61 |
JAVAC=${JAVA_HOME}/bin/javac |
62 |
ADDPATH="${JAVA_HOME}/bin:${JAVA_HOME}/jre/bin:${JAVA_HOME}/jre/javaws" |
63 |
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/" |
64 |
MANPATH="/opt/sun-jdk-1.4.2.10/man" |
65 |
ENV_VARS="JAVA_HOME JDK_HOME JAVAC ADDPATH ADDLDPATH MANPATH" |
66 |
|
67 |
You should also have something like /etc/env.d/20java This would be the |
68 |
version of java you currently have set (active). In my case, because I |
69 |
only have one java installed, it will largely be the same. its contents |
70 |
are: |
71 |
|
72 |
# Autogenerated by java-config |
73 |
# Command: --set-system-vm=sun-jdk-1.4.2.10 |
74 |
JDK_HOME=/opt/sun-jdk-1.4.2.10 |
75 |
JAVAC=/opt/sun-jdk-1.4.2.10/bin/javac |
76 |
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" |
77 |
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" |
78 |
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/" |
79 |
# VERSION="Sun JDK 1.4.2.10" |
80 |
MANPATH=${MANPATH}:/opt/sun-jdk-1.4.2.10/man |
81 |
JAVA_HOME=/opt/sun-jdk-1.4.2.10 |
82 |
|
83 |
Now if you have a file in /etc/env.d/java/<something> but don't have an |
84 |
/etc/env.d/20java (or if you do, it is empty), then you should be able |
85 |
to fix that with java-config (man java-config). However if both files |
86 |
/etc/env.d/java/<something> and /etc/env.d/20java seem legit, then we |
87 |
need to see why bash isn't sourcing the env.d files. In fact now that I |
88 |
think about it, that might be your problem, as your path did seem to be |
89 |
quite short. Mine for instance is: |
90 |
|
91 |
echo $PATH |
92 |
/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 |
93 |
|
94 |
Before I start speculating any further, let me know where the above |
95 |
leads you... |
96 |
|
97 |
|
98 |
|
99 |
-- |
100 |
gentoo-user@g.o mailing list |