简体   繁体   中英

File Not Found Error When Running Apache Tomcat7

I try to run the tomcat using./startup.sh under bin folder. The console print out following:

Using CATALINA_BASE:   /c/Users/zzhang/Desktop/apache-tomcat-7.0.107-src
Using CATALINA_HOME:   /c/Users/zzhang/Desktop/apache-tomcat-7.0.107-src
Using CATALINA_TMPDIR: /c/Users/zzhang/Desktop/apache-tomcat-7.0.107-src/temp
Using JRE_HOME:        /c/Program Files (x86)/Common Files/Oracle/Java
Using CLASSPATH:       /c/Users/zzhang/Desktop/apache-tomcat-7.0.107-src/bin/bootstrap.jar:/c/Users/zzhang/Desktop/apache-tomcat-7.0.107-src/bin/tomcat-juli.jar
Using CATALINA_OPTS:
Tomcat started.

However when I go to localhost:8080, it shows the site can't be reached. When I check the log in catalina.out it shows following:

/c/Users/zzhang/Desktop/apache-tomcat-7.0.107-src/bin/catalina.sh: line 498: /c/Program Files (x86)/Common Files/Oracle/Java/bin/java: No such file or directory

Anyone knows how can I solve this problem?

Currently my JAVA_HOME pointing to "C:\Program Files\Java\jdk-11\"

Thanks

Based on you using shell scripts (files ending with ".sh") and observing Windows paths ("c:\Program Files\Java\jdk-11" I'm guessing you're using cygwin?

catalina.sh will prefer your JRE_HOME unless you run with the debug option. What is your JRE_HOME set to? If it's set, try clearing it out...

$ export JRE_HOME=""
$ startup.sh

or

$ JRE_HOME="" startup.sh

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM