I have installed tomcat7 on my Ubuntu machine. When I try to restart the server I get message to set JAVA_HOME but it is set in .bashrc
export JAVA_HOME=/usr/lib/jvm/java-8-oracle
export CATALINA_HOME=/usr/share/tomcat7
Error:
omkars@<ubuntu_14.04>:~$ sudo service tomcat7 restart
[sudo] password for omkars:
* no JDK or JRE found - please set JAVA_HOME
omkars@<ubuntu_14.04>:~$ echo $JAVA_HOME
/usr/lib/jvm/java-8-oracle
What could be missing ? Thanks.
sudo; the environments won't be passed to that process. Second: I don't have Ubuntu at hand but: on RedHat/CentOS there are application server configs under/etc/specifying environments to use for startup. Try to grep/etcfor "JAVA_HOME". – try-catch-finally Dec 13 '14 at 9:40