Tomcat 7 from repository and Debian Wheezy.
If I try to start Tomcat by service it does not work
service tomcat7 start
[FAIL] no JDK found - please set JAVA_HOME ... failed!
But the variable is there
/var/lib/tomcat7/conf# echo $JAVA_HOME
/usr/lib/jvm/java-7-oracle
If I try from init.d it does work
/etc/init.d/tomcat7 start
[ ok ] Starting Tomcat servlet engine: tomcat7.
Looking in the /etc/inittab
# The default runlevel.
id:2:initdefault:
The default seems to be the 2
So, looking in the /etc/rc2.d
lrwxrwxrwx 1 root root 17 Nov 18 22:50 S01tomcat7 -> ../init.d/tomcat7
It seems it refers always to the same /etc/init.d/tomcat7 and I do not understand why it fails (complaining about java)..