1

I am trying to install apache-tomcat-7.0.82 on my MacBook running MacOs Sierra. I have not been successful.

Steps I've taken

  1. Downloaded the core binaries from https://tomcat.apache.org/download-70.cgi
  2. Extracted the files and move the folder to /usr/bin/apache-tomcat-7.0.82
  3. Followed the advice on this thread Tomcat 7.0.73 doesn't work with java 9
  4. Added setenvs.sh file to apache-tomcat-7.0.82 directory containing the two lines:

    JAVA_HOME="/Library/Java/JavaVirtualMachines/jdk-9.jdk/Contents/Home"
    JRE_HOME="/Library/Java/JavaVirtualMachines/jdk-9.jdk/Contents/Home"
    

The issue is I am getting the following error message when I run startup.sh in the tomcat logs (catalina.out).

Error: Could not find or load main class org.apache.catalina.startup.Bootstrap

Caused by: java.lang.ClassNotFoundException: org.apache.catalina.startup.Bootstrap

I'd appreciate any advice as I cannot seem to make any progress.

Basil Bourque
  • 303,325
  • 100
  • 852
  • 1,154
user7692855
  • 1,582
  • 5
  • 19
  • 39
  • Java 9 has significant changes in its architecture that are causing some failures in backward compatibility. That may be your problem. So I would delete 9 and install Java 8 Update 151. Also, no need to bury Tomcat in /usr/bin as macOS is not exactly a common-style Unix implementation. I keep Tomcat in my home folder. Also I find I must use the BatChmod.app to reassign the group privileges of Unix to ‘admin’ user for the Tomcat folder along with all nested folders, and checking that unchecked middle checkbox. Finally, I would use Tomcat 8.5.x if at all possible rather than 7. – Basil Bourque Oct 22 '17 at 05:37
  • And I have never found a need to set those environment variables to run Tomcat. – Basil Bourque Oct 22 '17 at 05:38

0 Answers0