I'm trying to get Tomcat7 running on a Raspberry Pi B+. I get an error message saying that JAVA_HOME is not set. I guess that if I set it in Bash, it won't load on startup, or am I wrong there?
sudo apt-get install tomcat7
[FAIL] no JDK found - please set JAVA_HOME ... failed!
invoke-rc.d: initscript tomcat7, action "start" failed.
JDK is installed:
ls -al /usr/lib/jvm/
total 32
drwxr-xr-x 4 root root 4096 mrt 13 14:23 .
drwxr-xr-x 72 root root 12288 mrt 13 14:19 ..
drwxr-xr-x 9 root root 4096 mrt 13 14:23 jdk-7-oracle-armhf
-rw-r--r-- 1 root root 1917 sep 25 2013 .jdk-7-oracle-armhf.jinfo
drwxr-xr-x 9 root root 4096 feb 16 13:31 jdk-8-oracle-arm-vfp-hflt
-rw-r--r-- 1 root root 2155 mrt 22 2014 .jdk-8-oracle-arm-vfp-hflt.jinfo
I;ve created the file /etc/profile.d/jdk_home
export JAVA_HOME=/usr/lib/jvm/jdk-8-oracle-arm-vfp-hflt/
After a restart this doesn't change anything.
How can I get this working?
lightdm
),/etc/profile
and other bash login shell scripts never get sourced, because you never actually start a login shell (different DM's have different policies about this...). Try/etc/environment
instead (there's probably nothing in it currently).JAVA_HOME
in/etc/environment
, but the system still starts with an error that the variable is not set (during startup).