>
> Hi,
> I've to write methods on calling which i'd be able to start and stop the 
> tomcat app server. I tried this -
> I'm using Tomcat 6.0.26.
> String[] command = new String[4];
>
> command[0] = "cmd";
> command[1] = "/C";
> command[2] = "startup.bat";
> command[3] = "C:\\";
> String x[] = {"PATH=C:\\Program Files\\Apache Software Foundation\\Apache 
> Tomcat 6.0.26\\bin","CATALINA_HOME=C:\\Program Files\\Apache Software 
> Foundation\\Apache Tomcat 6.0.26","JAVA_HOME=C:\\Program 
> Files\\Java\\jdk1.6.0_21","JRE_HOME=C:\\Program Files\\Java\\jre6"};
>
> Process p = Runtime.getRuntime().exec(command,x);
>
> 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[3], 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!
>
>
>
> --
> Kshitij Chandrasen
> Engineer, Software Engineering,
> Cisco Systems, CBSBU Engineering.
>
>


-- 
Kshitij Chandrasen
Engineer, Software Engineering,
Cisco Systems, CBSBU Engineering.

Reply via email to