在终端进入tomcat的目录,此处举例为/usr/local/ApacheTomcat/bin
cd /usr/local/ApacheTomcat/bin sh catalina.sh version输出的结果:
Using CATALINA_BASE: /usr/local/ApacheTomcat Using CATALINA_HOME: /usr/local/ApacheTomcat Using CATALINA_TMPDIR: /usr/local/ApacheTomcat/temp Using JRE_HOME: /Library/Java/JavaVirtualMachines/jdk1.8.0_261.jdk/Contents/Home Using CLASSPATH: /usr/local/ApacheTomcat/bin/bootstrap.jar:/usr/local/ApacheTomcat/bin/tomcat-juli.jar Server version: Apache Tomcat/9.0.37 Server built: Jun 30 2020 20:09:49 UTC Server number: 9.0.37.0 OS Name: Mac OS X OS Version: 10.15.6 Architecture: x86_64 JVM Version: 1.8.0_261-b12 JVM Vendor: Oracle Corporation可以看到,Server version里,tomcat的版本是9.0.37