On Wed, 20 May 2020 14:58:53 +0200 Alberto Cabello Sánchez <albe...@unex.es> wrote:
> On Wed, 20 May 2020 07:42:33 -0400 > Trae McCombs <traemcco...@gmail.com> wrote: > > > cat $TOMCAT_DIR/bin/setenv.sh > > #!/usr/bin/csh > > setenv FOO "-Dcom1 -Dcom2 -Dcom3 etc" > > > > run the above as a test in that bin dir: ./setenv.sh (no errors) > > env |grep FOO > > > > Nothing. > > The command > > ./setenv.sh > > spans a new csh process, then creates there the env variable FOO with > your desired value and exists. Your current shell is unaware of $FOO. > > I'm not a csh expert but in bash, you have to "source" the file with > > . ./setenv.sh Actually, this is what you have in line 150 of catalina.sh: if [ -r "$CATALINA_BASE/bin/setenv.sh" ]; then . "$CATALINA_BASE/bin/setenv.sh" elif [ -r "$CATALINA_HOME/bin/setenv.sh" ]; then . "$CATALINA_HOME/bin/setenv.sh" fi But you are instructing catalina.sh to span a new shell (#!/usr/bin/csh) so environment variables are not being passed. My own working setenv.sh reads just $ cat setenv.sh JAVA_HOME="/opt/jdk/" CATALINA_PID="$CATALINA_BASE/temp/catalina.pid" Hope that helps, -- Alberto Cabello Sánchez Servicio de Informática Universidad de Extremadura --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org