Re: System-wide PATH question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



John Haxby wrote:

Andrew Robinson wrote:

Where or how do I add something to the PATH system-wide?


I have a file called /etc/profile/java.sh that contains

#!/bin/sh

for file in /usr/java/*; do
   if [ -x $file/bin/java ]
   then export JAVA_HOME=$file
        break
   fi
done
unset file
PATH=$PATH:$JAVA_HOME/bin


It's where it is rather than how it does it that's important. Look at /etc/profile to see how the files in /etc/profile.d are handled.


This would be more general than just a pathmunge in the /etc/profile. Is the JAVA_HOME variable needed beyond this script? In other words, do applications need the JAVA_HOME variable?

Thanks!

Andrew



--
Shrike-list mailing list
Shrike-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/shrike-list

[Index of Archives]     [Fedora Users]     [Centos Users]     [Kernel Development]     [Red Hat Install]     [Red Hat Watch]     [Red Hat Development]     [Red Hat Phoebe Beta]     [Yosemite Forum]     [Fedora Discussion]     [Gimp]     [Stuff]     [Yosemite News]

  Powered by Linux