1 |
> So we have to get Java back into your path... I've |
2 |
> got Sun Java, so mine |
3 |
> will be slightly different than yours, but in your |
4 |
> /etc/env.d/ and |
5 |
> /etc/env.d/java directory you should have a couple |
6 |
> of files in there. |
7 |
> First you will have something like |
8 |
> /etc/env.d/java/20sun-jdk-1.4.2.10. |
9 |
> Each file in /etc/env.d/java/ represents each |
10 |
> version of java you have |
11 |
> installed on your system (thus you could have |
12 |
> multiple versions and |
13 |
> switch between them). my |
14 |
> /etc/env.d/java/20sun-jdk-1.4.2.10 contains |
15 |
> the following. |
16 |
> |
17 |
> # Copyright 1999-2004 Gentoo Foundation |
18 |
> # Distributed under the terms of the GNU General |
19 |
> Public License v2 |
20 |
> # $Header: |
21 |
> |
22 |
/var/cvsroot/gentoo-x86/dev-java/sun-jdk/files/sun-jdk-1.4.2.10,v |
23 |
> 1.2 |
24 |
> 2006/01/08 23:27:53 nichoj Exp $ |
25 |
> |
26 |
> VERSION="Sun JDK 1.4.2.10" |
27 |
> JAVA_HOME=/opt/sun-jdk-1.4.2.10 |
28 |
> JDK_HOME=/opt/sun-jdk-1.4.2.10 |
29 |
> JAVAC=${JAVA_HOME}/bin/javac |
30 |
> |
31 |
ADDPATH="${JAVA_HOME}/bin:${JAVA_HOME}/jre/bin:${JAVA_HOME}/jre/javaws" |
32 |
> |
33 |
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/" |
34 |
> MANPATH="/opt/sun-jdk-1.4.2.10/man" |
35 |
> ENV_VARS="JAVA_HOME JDK_HOME JAVAC ADDPATH ADDLDPATH |
36 |
> MANPATH" |
37 |
> |
38 |
> You should also have something like |
39 |
> /etc/env.d/20java This would be the |
40 |
> version of java you currently have set (active). In |
41 |
> my case, because I |
42 |
> only have one java installed, it will largely be the |
43 |
> same. its contents |
44 |
> are: |
45 |
> |
46 |
> # Autogenerated by java-config |
47 |
> # Command: --set-system-vm=sun-jdk-1.4.2.10 |
48 |
> JDK_HOME=/opt/sun-jdk-1.4.2.10 |
49 |
> JAVAC=/opt/sun-jdk-1.4.2.10/bin/javac |
50 |
> |
51 |
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" |
52 |
> |
53 |
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" |
54 |
> |
55 |
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/" |
56 |
> # VERSION="Sun JDK 1.4.2.10" |
57 |
> MANPATH=${MANPATH}:/opt/sun-jdk-1.4.2.10/man |
58 |
> JAVA_HOME=/opt/sun-jdk-1.4.2.10 |
59 |
> |
60 |
> Now if you have a file in |
61 |
> /etc/env.d/java/<something> but don't have an |
62 |
> /etc/env.d/20java (or if you do, it is empty), then |
63 |
> you should be able |
64 |
> to fix that with java-config (man java-config). |
65 |
> However if both files |
66 |
> /etc/env.d/java/<something> and /etc/env.d/20java |
67 |
> seem legit, then we |
68 |
> need to see why bash isn't sourcing the env.d files. |
69 |
> In fact now that I |
70 |
> think about it, that might be your problem, as your |
71 |
> path did seem to be |
72 |
> quite short. Mine for instance is: |
73 |
> |
74 |
> echo $PATH |
75 |
> |
76 |
/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 |
77 |
> |
78 |
> Before I start speculating any further, let me know |
79 |
> where the above |
80 |
> leads you... |
81 |
|
82 |
heathen@sarawak ~ $ ls /etc/env.d |
83 |
00basic 05portage.envd 30java-finalclasspath |
84 |
50ncurses binutils |
85 |
01hostname 09ati 45qt3 |
86 |
50qtdir3 gcc |
87 |
02distcc 10MozillaFirefox 46kdepaths-3.4 |
88 |
60ladspa java |
89 |
03opengl 10mozilla 50gconf |
90 |
70less |
91 |
05binutils 10xorg 50glib2 |
92 |
99kde-env |
93 |
05gcc 20java 50gtk2 |
94 |
99limewire |
95 |
heathen@sarawak ~ $ ls /etc/env.d/java |
96 |
20blackdown-jdk-1.4.2.02 20blackdown-jre-1.4.2.02 |
97 |
|
98 |
When I do the following limewire comes back: |
99 |
|
100 |
PATH=$PATH:/path/to/java/bin |
101 |
export PATH |
102 |
|
103 |
But it doesn't survive a reboot. |
104 |
|
105 |
Somebody said put those commands into ~/.bash_profile. |
106 |
How would that work? I mean what's the syntax? Just |
107 |
like they are there. This is all I got in |
108 |
.bash_profile now: |
109 |
|
110 |
heathen@sarawak ~ $ cat .bash_profile |
111 |
# /etc/skel/.bash_profile: |
112 |
# $Header: |
113 |
/var/cvsroot/gentoo-x86/app-shells/bash/files/dot-bash_profile,v |
114 |
1.1 2005/04/30 00:08:01 vapier Exp $ |
115 |
|
116 |
# This file is sourced by bash for login shells. The |
117 |
following line |
118 |
# runs your .bashrc and is recommended by the bash |
119 |
info pages. |
120 |
[[ -f ~/.bashrc ]] && . ~/.bashrc |
121 |
|
122 |
|
123 |
> |
124 |
> |
125 |
> |
126 |
> -- |
127 |
> gentoo-user@g.o mailing list |
128 |
> |
129 |
> |
130 |
|
131 |
|
132 |
__________________________________________________ |
133 |
Do You Yahoo!? |
134 |
Tired of spam? Yahoo! Mail has the best spam protection around |
135 |
http://mail.yahoo.com |
136 |
-- |
137 |
gentoo-user@g.o mailing list |