I have a problem with java hosting. I try to run an application that need Java and get the error "exec: Java: not found". I tried in SSH to find java, but the command is not recognized. My server is running with Linux and Apache Tomcat 5.5
Andrei LastName wrote:Hi to all !
I have a problem with java hosting. I try to run an application that need Java and get the error "exec: Java: not found". I tried in SSH to find java, but the command is not recognized. My server is running with Linux and Apache Tomcat 5.5
Anybody know the solution ?
Hi Andrei,
JDK / JRE installation is not in your $PATH.
If your tomcat can startup without a problems, that means that JAVA_HOME is set correctly
somewhere inside tomcat startup scripts. Try to find catalina.sh file inside your tomcat's bin directory
and search for JAVA_HOME. It should be something like /usr/local/jdk (really depends on where your
host installed JDK).
then edit your .bashrc file adding one line at the end:
export PATH=$PATH:/usr/local/jdk/bin
and relog. Remember that "/usr/local/jdk" was used as an example, it can be different on your server.
I would also suggest to contact your host, I'm pretty sure they can do it for you.