Link to home
Start Free TrialLog in
Avatar of BILL Carlisle
BILL CarlisleFlag for United States of America

asked on

Why? java path not coming before /usr/bin

ok, how come the java path is not coming before /usr/bin

.profile
PATH=/usr/java71/bin:/usr/bin:/etc:/usr/sbin:/usr/ucb:$HOME/bin:/usr/bin/X11:/sbin.

export PATH

if [ -s "$MAIL" ]           # This is at Shell startup.  In normal
then echo "$MAILMSG"        # operation, the Shell checks
fi                          # periodically.

# User specific aliases and functions
export AS_JAVA=/usr/java71
export JAVA_HOME=/usr/java71
export JAVA_BINDIR="${JAVA_HOME}/bin"
echo $PATH | /bin/grep -q -v "${JAVA_BINDIR}"
if [ $? -eq 0 ]; then export PATH="${JAVA_BINDIR}:${PATH}"; fi
echo $PATH
export GLASSFISH_PARENT=/u01/oracle/glassfish
export GLASSFISH_HOME=/u01/oracle/glassfish/glassfish
echo $PATH | /bin/grep -q -v "${GLASSFISH_HOME}/bin"
if [ $? -eq 0 ]; then export PATH="${PATH}:${GLASSFISH_HOME}/bin"; fi
echo $PATH

Open in new window


Then I run the following and it shows /usr/java71/bin is in front of /usr/bin/
but then
$ ./.profile
[YOU HAVE NEW MAIL]
/usr/java71/bin:/usr/bin:/etc:/usr/sbin:/usr/ucb:/home/glassfsh/bin:/usr/bin/X11:/sbin.
/usr/java71/bin:/usr/bin:/etc:/usr/sbin:/usr/ucb:/home/glassfsh/bin:/usr/bin/X11:/sbin.:/u01/oracle/glassfish/glassfish/bin
$ echo $PATH
/usr/bin:/etc:/usr/sbin:/usr/ucb:/home/glassfsh/bin:/usr/bin/X11:/sbin:/usr/java71/bin.:/u01/oracle/glassfish/glassfish/bin

Open in new window

Avatar of woolmilkporc
woolmilkporc
Flag of Germany image

You must "source" the .profile, i.e. run it inside the current shell, like this

. ./.profile

dot space dot slash dot profile

Didn't I mention that in our previous thread?
Avatar of BILL Carlisle

ASKER

Yes you did but I thought Sandys was same and it returned the email msg so I thought it did it ???
ASKER CERTIFIED SOLUTION
Avatar of woolmilkporc
woolmilkporc
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Sorry got busy with the "Next" thing :)
Thank you so much for your help.