This gives me a strange windows error saying - The system cannot find the file -Djava.util.logging.config.file="C:\Program Files\Apache Software Foundation\Apache Tomcat 6.0.26\conf\logging.properties", while it actually exists.
If instead of setting the path, I give the absolute path of startup.bat in command, it works fine -
Process p = Runtime.getRuntime().exec("cmd /C start C:\\broadway\\bat\\startup.bat"); //I copied the startup.bat to a folder and ran it from there, it worked fine.
Please give me pointers to the right direction!
Actually, one of the more popular ways to get a Java program to run Tomcat is to have it run embedded. The Tomcat server can be instantiated as a JavaBean and launched directly instead of having to go through the shell interface. The JBoss appserver is an example of this.
However, if that's not appropriate, what I recommend is that you make your request less "Windows-like". The Windows file naming can make a mess of any Java application. So use the forward-slash path separator where you can and avoid file and directory names with spaces in them (like "Program Files").
I think you've also got a problem there because you're attempting to set up a classpath. The Tomcat script files set up the classpath themselves. However, you do have to have the environment variable "JAVA_HOME" set. Other Tomcat environment variables are usually optional.
Customer surveys are for companies who didn't pay proper attention to begin with.