Prefix your command by "cmd /c ". it should work then, provided your .exe
can be found in the PATH variable.
so -> String[] command = {"cmd /c Instradamento.exe .....

HTH

Nico.


At 04:43 PM 2/22/2002, you wrote:
>Hi all
>
>         i need to execute an external program from within a Servlet
>
>         and i try this code:
>
>             private void Instradamento() {
>    try {
>          NPL_Parametri par= new NPL_Parametri();
>
>           String[] command = {"Instradamento.exe "+par.Username
> +"/"+par.Password+"@"+par.Host+"             "+progetto+" S "+tipocirc+"
> "+servizio+" "+cliente+" "+sedeo+" "+seded+" "+codtask};
>           Process p = Runtime.getRuntime().exec(command);
>           } catch (Exception e) {
>           context.log( e.toString() );}
>
>
>   }
>
>     but i receive this error:
>     java.io.IOException: CreateProcess: START.BAT  error=2
>
>     I don't understand what means error=2
>
>     can you help me ?
>
>         Thanks

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to