Check the following outputs:
1. echo $JAVA_HOME
2. echo $PATH
3. java -version
4. Check $CATALINA_HOME/bin/setenv.sh
file
And if you're starting your tomcat via a service call (and not via startup.sh), check that script as well to see if the JAVA_HOME is set to something there.
Usually, fixing the setenv.sh
file should do the trick.