File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Error exec: Java not found
 
Similar Threads
Open url from Servlet
Getting error message - chapter 9 of ejb 3 in action using glassfish server 2.1
exec of batch file fails
Getting error chapter 8 of Ejb 3 in action using glassfish server 2.1
separate JVM's