How to Get Tomcat Home Directory in Java


Through this example, we can learn about how to get the Tomcat home directory in Java.

Source Code

package com.beginner.examples;

public class GetTomcatHome {

	public static void main(String[] args) {
		
		String path=System.getProperty("catalina.home");
		System.out.println(path);

	}

}

Output:

C:developapache-tomcat-7.0.75
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments