我想为我的目标修改 apache tomcat9 所以我想知道程序的起点在哪里作为主要方法?
One of the tip is to use jps
(A CLI tool shipped with Java SDK) to print out the main method that start a Java Process after you start Tomcat. You have to use -l
if you want to display full patch of the main method and -m
to display the arguments passed to the main method :
jps -lmv
Then it will show something like :
6622 org.apache.catalina.startup.Bootstrap start --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED -Djava.util.logging.config.file=/Users/kc/Downloads/apache-tomcat-9.0.8/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djdk.tls.ephemeralDHKeySize=2048 -Djava.protocol.handler.pkgs=org.apache.catalina.webresources -Dorg.apache.catalina.security.SecurityListener.UMASK=0027 -Dignore.endorsed.dirs= -Dcatalina.base=/Users/kc/Downloads/apache-tomcat-9.0.8 -Dcatalina.home=/Users/kc/Downloads/apache-tomcat-9.0.8 -Djava.io.tmpdir=/Users/kc/Downloads/apache-tomcat-9.0.8/temp
which means the main method that start Tomcat is the class org.apache.catalina.startup.Bootstrap
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.