Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to install Tomcat on my linux server .Once I had installed glassfish and already working with it . I successfully installed tomcat7 to my server but when I request the machine url : 8081 (I edited the port number becouse of multiple tomcat and glassfish) default tomcat page not working and therefore I see inside of catalina.out file a content /usr/lib/server/apache-tomcat-7.0.27/bin/ line 389: /usr/local/jdk/bin/java: No such file or directory

I m not good at this setup enviroment part.But As I understood it says i m looking for java on this path "/usr/local/jdk/bin/java" and cant find java .After that when I check my tomcat path with which-java it returns /usr/bin/java/ but this java is a link file type whatever not the java I looked for or i can use .

Here is link [java.file] Now I want to learn what is the solution for this solution if I change java directory can it effect glassfish ?if yes how I can edit java path info for tomcat and glassfish ? Lastly all the tutorials writers says set java home /usr/java/jdk1.5.0_07/bin/java but I have no path like this i can create it but is it true ?

Thanks for all advice , critic and help.

share|improve this question

migrated from Apr 25 '12 at 13:10

This question came from our site for professional and enthusiast programmers.

Which Linux distribution are you using? Did you install tomcat with the package manager of your distribution? If not: Why? – Andreas Florath Apr 24 '12 at 22:14
@AndreasFlorath My linuux version is LSB Version: :core-4.0-amd64:core-4.0-ia32:core-4.0- noarch:graphics-4.0-amd64:graphics-4.0-ia32:graphics-4.0- noarch:printing-4.0-amd64:printing-4.0-ia32:printing-4.0-noarch Distributor ID: CentOS Description: CentOS release 5.8 (Final) Release: 5.8 Codename: Final </blink> – malcolmx Apr 26 '12 at 2:56
up vote 0 down vote accepted

I recently followed this blog's instructions, that I found very helpful, especially regarding all those env vars :

(it starts with the installation of the JDK, don't hesitate to reinstall it).

share|improve this answer
But it gives error when i try to shutdown it /usr/local/jdk/bin/java: No such file or directory it try to use older java but i had set it many times as /usr/local/jdk/ how can i set JAVA_HOME="" permanently Thanks – malcolmx Apr 26 '12 at 3:03

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.