I have CentOS 6.4 installed on VMware. Recently installed Java SE8 and Apache Tomcat server but I cant't connect to the server by using `localhost:8080' browser says Unable to Connect. I have also tried changing the connector port in the tomcat server config but still unable to connect.



export PATH
export JRE_HOME

host file   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6

terminal on starting Tomcat

Using CATALINA_BASE:   /media/new/softwares/Tomcat/apache-tomcat-8.0.5
Using CATALINA_HOME:   /media/new/softwares/Tomcat/apache-tomcat-8.0.5
Using CATALINA_TMPDIR: /media/new/softwares/Tomcat/apache-tomcat-8.0.5/temp
Using JRE_HOME:        /usr/local/jdk1.8.0/jre/bin
Using CLASSPATH:       /media/new/softwares/Tomcat/apache-tomcat 8.0.5/bin/bootstrap.jar:/media/new/softwares/Tomcat/apache-tomcat-8.0.5/bin/tomcat-juli.jar
Tomcat started.

tomcat's log

/media/new/softwares/Tomcat/apache-tomcat-8.0.5/bin/catalina.sh: line 399: /usr/local/jdk1.8.0/jre/bin/bin/java: No such file or directory

4 Answers 4


Seems pretty cut and dry. You don't have Java installed. Or at least it isn't in the location that Tomcat is looking.

/media/new/softwares/Tomcat/apache-tomcat-8.0.5/bin/catalina.sh: line 399: /usr/local/jdk1.8.0/jre/bin/bin/java: No such file or directory

You'll need to to go www.java.com and download JDK 1.8.0 or some version of Java and install it to /usr/local/... and then change the configurations around in Tomcat so that it can find Java.

  • I have java installed command java -version shows java version "1.8.0" Java(TM) SE Runtime Environment (build 1.8.0-b132) Java HotSpot(TM) 64-Bit Server VM (build 25.0-b70, mixed mode). Can you tell me how to change Tomcat configuration to let it find java Mar 29, 2014 at 8:03
  • Try setting the variable $JDK_HOME, and exporting it similar to the other variables.
    – slm
    Mar 29, 2014 at 12:48

This path of JDK exist? Give more information about this JDK if you see this error message :


There are two /bin/bin maybe this is the error. If jdk exists, try to use this config:

Using JRE_HOME:        /usr/local/jdk1.8.0/jre

I was also facing same problem and found that is was because catalina.sh not figure out jre path. So solved by setting following path variables :

export JAVA_HOME="/usr/java/jdk1.8.0_25"

export JRE_HOME=/usr/java/jdk1.8.0_25/jre


You should set JAVA_HOME=/usr/local/jdk1.8.0 or JRE_HOME=/usr/local/jdk1.8.0/jre

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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