Arch Linux. Servlet apparently had compatibility problems with openjdk so I uninstalled it and installed the plain jdk/jre from AUR.
# /etc/rc.d/tomcat7 restart
:: Stopping tomcat7 daemon [FAIL]
:: Starting tomcat7 daemon [BUSY]
Cannot locate Java Home
Added export TOMCAT_JAVA_HOME=/opt/java
to /etc/profile.d/jdk.sh
(and equivalent under jdk.csh
), rebooted. echo $JAVA_HOME
and echo $TOMCAT_JAVA_HOME
both return /opt/java
, but still no dice. Why?
I solved this issue following this page: https://bugs.archlinux.org/task/24126
Basically you have to add these lines in your /etc/rc.d/tomcat7 file, below the line ". /etc/conf.d/${daemon_name}"
Hope this helps.
You need to try doing :
root mustn't be allowed to see environment the way "we" do.
The Sudoers Manual has this to say...
... and ...
My solution was :
I hope this helps,
Hasan
Do you get anything by typing "javac" in the console? That will tell you if you have JDK installed rather than just JRE. Also, type the command "which java" to see where your java is linked to. I never use ArchLinux, but on Ubuntu and Mint, they use the alternatives link system to link the default Java installation... in that case I use a tool called "galternatives" to configure Oracle Java after I install it.
I don't think Arch Linux uses the alternatives system like Ubuntu does, but it seems like adding java to the PATH environment variable, in your .bashrc , would be the way to go, rather than unnecessarily editing the JAVA_HOME and CATALINA_HOME env variables in the tomcat script (since the script should be able to auto-determine those based on the java binaries location).
Open
catalina.sh
and add the following lines before the first code lines (but ofc below the shebang)Adjust the path to fit your needs. No need to manipulate any PATH or persistent variable for Tomcat to work properly.