0

I have been trying to start tomcat7 server without success. I am using the Raspbian distro in a RaspberryPI.

When I try to start tomcat:

$ sudo service tomcat7 start
[FAIL] no JDK found - please set JAVA_HOME ... failed!

However $ echo $JAVA_HOME yields /usr/lib/jvm/jdk-8-oracle-arm-vfp-hflt. Which I believe is the right path since:

$ sudo update-alternatives --config java
There is only one alternative in link group java (providing /usr/bin/java):
/usr/lib/jvm/jdk-8-oracle-arm-vfp-hflt/jre/bin/java
Nothing to configure.

Thanks

eversor
  • 101
  • 2
  • There is a difference between JDK and JRE.... but tomcat shouldn't need a JDK, so I imagine you need to set it in /etc/defaults/ somewhere? If you run the init script with `bash -x /etc/init.d/tomcat7 start` then you might get a clue as to where its sourcing its environment. Try also `JAVA_HOME=...path/to/jre/ /etc/init.d/tomcat7 start` – Cameron Kerr May 04 '15 at 14:58
  • @CameronKerr what should I look for when I run the script with `bash -x`? – eversor May 04 '15 at 16:19
  • Look for files that are consulted, and expecially anywhere that sets or tests JAVA_HOME – Cameron Kerr May 05 '15 at 00:10

1 Answers1

0

Ok, I fixed editing the JAVA_HOME within the /etc/default/tomcat7 as this post suggests.

eversor
  • 101
  • 2