I have installed JDK and Groovy on my Solaris 11 machine. I would now like to set things up so that the PATH variable would contain the bin directories whenever I open a shell.
It is my understanding that the following lines added at the end of the /etc/profile file should do the trick.
JAVA_HOME=/usr/jdk/instances/jdk1.7.0 PATH=${PATH}:${JAVA_HOME}/bin GROOVY_HOME=/usr/local/bin/groovy-2.1.3 PATH=${PATH}:${GROOVY_HOME}/bin export PATH However, when I restart my putty session, only the JAVA_HOME and GROOVY_HOME variables are affected. The PATH variable stays the same, e.g.
/usr/bin:/usr/sbin I am wondering if there is another script that runs after /etc/profile, that might override the PATH variable. But I have no idea where to look.
Or is there another problem?
As porposed in a comment, I tried to use the following lines instead, but unfortunatelly with the same effect.
JAVA_HOME=/usr/jdk/instances/jdk1.7.0 GROOVY_HOME=/usr/local/bin/groovy-2.1.3 export PATH=${PATH}:${GROOVY_HOME}/bin:${JAVA_HOME}/bin
JAVA_HOMEandGROOVY_HOMEvariables, then set the path all at once with this:export PATH=$PATH:$JAVA_HOME:$GROOVY_HOME