tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ricardo_Bo...@iwaysoftware.com
Subject RE: >>> Starting an .exe though out of a servlet
Date Mon, 13 Jan 2003 16:09:00 GMT
try using an absolute path. Also not that there is an output and error
stream which you are not aquireing that may have more detailed information.


-rickb

-----Original Message-----
From: Patrick Kosiol [mailto:kosiol@simu.de]
Sent: Monday, January 13, 2003 10:58 AM
To: Tomcat Users List
Subject: >>> Starting an .exe though out of a servlet


Hi,

I'm runnung TomCat 4.0.4 and I want to start an external .exe-File.
My Code:

        String[] runString = {relativeDataPath + "data.exe",
          parameter0, parameter1, parameter2, parameter3};
        Process p = Runtime.getRuntime().exec(runString);
        System.out.println(runString);
        if(p.waitFor() == 0){
          ........

The 'data.exe'-File is placed in 
$CATALINA_HOME/webapps/ROOT/relativeDataPath so it should be no problem 
to access this File. The Number of  Parameters etc. is OK.
But I get the following Error-Message:

java.io.IOException: CreateProcess: 
'relativeDataPath'/bfpldata.exe parameter0 parameter1 parameter2 
parameter3 error=3

Does someone know what 'error=3' mean? And how can I access this 
'data.exe' and execute this File with the Parameters? The 
starting-routine seems to be correct.


Thx
Patrick


--
To unsubscribe, e-mail:
<mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail:
<mailto:tomcat-user-help@jakarta.apache.org>

--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message