use your favorite editor (vi - emacs - gedit - kate - doesn't matter) edit file called java.sh and ultimately save it to /etc/profile.d/ and make it owned by root:root The contents of the file are below, as I originally suggested...of course, you would need to verify that this is the same version of java that you are using and the files are located where they are stated to be. to apply it to current login shells...you would have to source it... . /etc/profile.d/java.sh or source /etc/profile.d/java.sh then echo $JAVA_HOME you should see the value for $JAVA_HOME or the 'ENV' you are asking about. and echo $PATH should show the java binary path by virtue of the file being in /etc/profile.d - any new 'logins' will automtically source that file since all scripts in /etc/profile.d are automatically loaded by virtue of the following code in /etc/profile for i in /etc/profile.d/*.sh ; do if [ -r "$i" ]; then . $i fi done Craig On Tue, 2006-03-28 at 19:05 +0200, Ali Helmy wrote: > so, to kill all the birds with one stone? i type in all that you sent > me at the terminal? > > I type: > # cat /etc/profile.d/java.sh > JREHOME="/usr/java/jre1.5.0_06 > /lib/i386" > JAVA_HOME="/usr/java/jre1.5.0_06" > JAVAWSHOME="/usr/java/jre1.5.0_06/javaws" > LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$JREHOME:$JAVAWSHOME" > PATH="$PATH:/usr/java/jre1.5.0_06/bin" > export JAVA_HOME > > ? > > > > On 28/03/06, Craig White <craigwhite@xxxxxxxxxxx> wrote: > and then his next question is gonna be...why can't it find > java? Because > he needs it in his $PATH > > ;-) > > I personally liked the idea of killing all of the birds with > one stone. > > Craig > > On Tue, 2006-03-28 at 20:20 +0530, मयंक जैन (Mayank Jain) > wrote: > > On Mon, 2006-03-27 at 21:11 +0200, Ali Helmy wrote: > > > I do ALL THAT to make an environment var? > > > > > > > Add > > export JAVA_HOME="/usr/java/jre1.5.0_06" > > to your ~/.bashrc file. > > > > :) > > Mayank > > > > > On 27/03/06, Craig White <craigwhite@xxxxxxxxxxx> wrote: > > > On Mon, 2006-03-27 at 20:08 +0200, Ali Helmy > wrote: > > > > Hey mates, > > > > > > > > In an installation of one program (Apache > Tomcat) it > > > instructed me to: > > > > Set an environment variable named JAVA_HOME to > the pathname > > > of the > > > > directory into which you installed the JRE... > > > > > > > > So how does one set an environment variable? > Assuming I got > > > java > > > > installed at /usr/java/ > > > ---- > > > this ***may*** be useful to you > > > > > > # cat /etc/profile.d/java.sh > > > JREHOME="/usr/java/jre1.5.0_06/lib/i386" > > > JAVA_HOME="/usr/java/jre1.5.0_06" > > > JAVAWSHOME="/usr/java/jre1.5.0_06/javaws" > > > LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$JREHOME: > $JAVAWSHOME" > > > PATH="$PATH:/usr/java/jre1.5.0_06/bin" > > > export JAVA_HOME > > > > > > Adjust as needed > > > > > > Craig > > > > > > -- > > > fedora-list mailing list > > > fedora-list@xxxxxxxxxx > > > To unsubscribe: > > > > https://www.redhat.com/mailman/listinfo/fedora-list > > > > > > > > > > > > -- > > > A. Helmy > > > -- > > > fedora-list mailing list > > > fedora-list@xxxxxxxxxx > > > To unsubscribe: > https://www.redhat.com/mailman/listinfo/fedora-list > > > > -- > fedora-list mailing list > fedora-list@xxxxxxxxxx > To unsubscribe: > https://www.redhat.com/mailman/listinfo/fedora-list > > > > -- > A. Helmy > -- > fedora-list mailing list > fedora-list@xxxxxxxxxx > To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list