Re: Environment vars (JAVA_HOME) not working on Debian 4
On Mon, Jan 16, 2012 at 10:54:37AM +0100, Oscar Vidal wrote: > Hello List, > > I'm having a wired problem right now and I need some help. > > I'm not able to set the JAVA_HOME variable > > # export JAVA_HOME=/opt/jdk1.6.0_07 > # echo $JAVA_HOME > /opt/jdk1.6.0_07 > # sudo /opt/apache-tomcat-7.0.23/bin/startup.sh > Neither the JAVA_HOME nor the JRE_HOME environment variable is defined > At least one of these environment variable is needed to run this program sudo clears the environment by default except for certain specific environment variables. You will need to use env or the like for this case or modify /etc/sudoers.conf. -- brian m. carlson / brian with sandals: Houston, Texas, US +1 832 623 2791 | http://www.crustytoothpaste.net/~bmc | My opinion only OpenPGP: RSA v4 4096b: 88AC E9B2 9196 305B A994 7552 F1BA 225C 0223 B187 signature.asc Description: Digital signature
Re: Environment vars (JAVA_HOME) not working on Debian 4
SOLVED I just add the export JAVA_HOME=/opt/jdk1.6.0_07 in the beginning of the startup.sh script thanks Oscar 2012/1/16 Oscar Vidal > Hi, > > thanks for the answer but it didn't work to me. > I tried: > > # sudo -E /opt/java/apache-tomcat-7/bin/startup.sh > sudo: illegal option `-E' > usage: sudo -K | -L | -V | -h | -k | -l | -v > usage: sudo [-HPSb] [-p prompt] [-u username|#uid] > { -e file [...] | -i | -s | } > > Some other suggestion please? > > Thanks, > Oscar > > 2012/1/16 Grégoire Neuville > >> Hi, >> >> sudo -E /opt/apache-tomcat-7.0.23/bin/startup.sh >> >> should do it. >> >> HTH, >> >> Grégoire Neuville. >> >> On 16 January 2012 10:54, Oscar Vidal wrote: >> > Hello List, >> > >> > I'm having a wired problem right now and I need some help. >> > >> > I'm not able to set the JAVA_HOME variable >> > >> > # export JAVA_HOME=/opt/jdk1.6.0_07 >> > # echo $JAVA_HOME >> > /opt/jdk1.6.0_07 >> > # sudo /opt/apache-tomcat-7.0.23/bin/startup.sh >> > Neither the JAVA_HOME nor the JRE_HOME environment variable is defined >> > At least one of these environment variable is needed to run this program >> > >> > The variable looks like it is set but later the tomcat script is not >> able to >> > detect. >> > I can show more information if needed, just tell me what :) >> > >> > Thank you in advance. >> > Oscar >> >> >> >> -- >> Grégoire Neuville >> > >
Environment vars (JAVA_HOME) not working on Debian 4
Hello List, I'm having a wired problem right now and I need some help. I'm not able to set the JAVA_HOME variable # export JAVA_HOME=/opt/jdk1.6.0_07 # echo $JAVA_HOME /opt/jdk1.6.0_07 # sudo /opt/apache-tomcat-7.0.23/bin/startup.sh Neither the JAVA_HOME nor the JRE_HOME environment variable is defined At least one of these environment variable is needed to run this program The variable looks like it is set but later the tomcat script is not able to detect. I can show more information if needed, just tell me what :) Thank you in advance. Oscar