aspose file tools*
The moose likes Tomcat and the fly likes Error exec: Java not found Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Error exec: Java not found" Watch "Error exec: Java not found" New topic
Author

Error exec: Java not found

Andrei LastName
Greenhorn

Joined: Mar 10, 2011
Posts: 1
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 ?

Thanks,
Andrew.
K. Gil
Ranch Hand

Joined: Apr 29, 2011
Posts: 75

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.

good luck!
http://www.uki6.com
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Error exec: Java not found