目的:每次在本机上跑tomcat服务时,都会在本机上有相关的存储,有时甚至会影响调试,并且占用磁盘。因此,需要将这些存储的内容清除。
当利用idea运行tomcat时 会产生如下输出
Using CATALINA_BASE: "C:\Users\Username\AppData\Local\JetBrains\IntelliJIdea2020.3\tomcat\48882c8b-1385-41f6-93aa-fce38283ae54"
Using CATALINA_HOME: "D:\java\apache-tomcat-9.0.50-windows-x64\apache-tomcat-9.0.50"
Using CATALINA_TMPDIR: "D:\java\apache-tomcat-9.0.50-windows-x64\apache-tomcat-9.0.50\temp"
Using JRE_HOME: "C:\Program Files\Java\jdk1.8.0_131"
Using CLASSPATH: "D:\java\apache-tomcat-9.0.50-windows-x64\apache-tomcat-9.0.50\bin\bootstrap.jar;D:\java\apache-tomcat-9.0.50-windows-x64\apache-tomcat-9.0.50\bin\tomcat-juli.jar"
Using CATALINA_OPTS: ""
CATALINA_BASE,根据官方文档的解释:Represents the root of a runtime configuration of a specific Tomcat instance. If you want to have multiple Tomcat instances on one machine, use the CATALINA_BASE
property.(是一个tomcat实例运行的根文件,可以利用CATALINA_BASE创建多个实例)。因此,将这些文件删除即可达到目的。
CATALINA_HOME,根据官方文档的解释: Represents the root of your Tomcat installation, 即是tomcat的安装根目录。