MCPcopy Index your code
hub / github.com/apache/tomcat / main

Method main

java/org/apache/catalina/startup/Tool.java:115–230  ·  view source on GitHub ↗

The main program for the bootstrap. @param args Command line arguments to be processed

(String[] args)

Source from the content-addressed store, hash-verified

113 * @param args Command line arguments to be processed
114 */
115 @SuppressWarnings("null")
116 public static void main(String[] args) {
117
118 // Verify that "catalina.home" was passed.
119 if (catalinaHome == null) {
120 log.error("Must set '" + Constants.CATALINA_HOME_PROP + "' system property");
121 System.exit(1);
122 }
123
124 // Process command line options
125 int index = 0;
126 label:
127 while (true) {
128 if (index == args.length) {
129 usage();
130 System.exit(1);
131 }
132 switch (args[index]) {
133 case "-ant":
134 ant = true;
135 break;
136 case "-common":
137 common = true;
138 break;
139 case "-server":
140 server = true;
141 break;
142 case "-shared":
143 shared = true;
144 break;
145 default:
146 break label;
147 }
148 index++;
149 }
150
151 // Set "ant.home" if requested
152 if (ant) {
153 System.setProperty("ant.home", catalinaHome);
154 }
155
156 // Construct the class loader we will be using
157 ClassLoader classLoader = null;
158 try {
159 List<File> packed = new ArrayList<>();
160 List<File> unpacked = new ArrayList<>();
161 unpacked.add(new File(catalinaHome, "classes"));
162 packed.add(new File(catalinaHome, "lib"));
163 if (common) {
164 unpacked.add(new File(catalinaHome, "common" + File.separator + "classes"));
165 packed.add(new File(catalinaHome, "common" + File.separator + "lib"));
166 }
167 if (server) {
168 unpacked.add(new File(catalinaHome, "server" + File.separator + "classes"));
169 packed.add(new File(catalinaHome, "server" + File.separator + "lib"));
170 }
171 if (shared) {
172 unpacked.add(new File(catalinaHome, "shared" + File.separator + "classes"));

Callers

nothing calls this directly

Calls 15

usageMethod · 0.95
createClassLoaderMethod · 0.95
handleThrowableMethod · 0.95
errorMethod · 0.65
addMethod · 0.65
isDebugEnabledMethod · 0.65
debugMethod · 0.65
isTraceEnabledMethod · 0.65
traceMethod · 0.65
getMethodMethod · 0.65
invokeMethod · 0.65

Tested by

no test coverage detected