Return-Path: Delivered-To: apmail-jakarta-tomcat-user-archive@apache.org Received: (qmail 4078 invoked from network); 10 Feb 2003 17:09:07 -0000 Received: from exchange.sun.com (192.18.33.10) by daedalus.apache.org with SMTP; 10 Feb 2003 17:09:07 -0000 Received: (qmail 29130 invoked by uid 97); 10 Feb 2003 17:10:39 -0000 Delivered-To: qmlist-jakarta-archive-tomcat-user@nagoya.betaversion.org Received: (qmail 29122 invoked from network); 10 Feb 2003 17:10:39 -0000 Received: from daedalus.apache.org (HELO apache.org) (208.185.179.12) by nagoya.betaversion.org with SMTP; 10 Feb 2003 17:10:39 -0000 Received: (qmail 1919 invoked by uid 500); 10 Feb 2003 17:08:33 -0000 Mailing-List: contact tomcat-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Tomcat Users List" Reply-To: "Tomcat Users List" Delivered-To: mailing list tomcat-user@jakarta.apache.org Received: (qmail 1880 invoked from network); 10 Feb 2003 17:08:33 -0000 Received: from mailgate.riskdecisions1.co.uk (HELO riskdecisions.com) (62.49.48.178) by daedalus.apache.org with SMTP; 10 Feb 2003 17:08:33 -0000 Received: from awari ([192.168.2.36]) by riskdecisions.com ([192.168.2.65]) with SMTP (MDaemon.PRO.v6.5.2.R) for ; Mon, 10 Feb 2003 17:08:28 +0000 Message-ID: <033001c2d127$98400f60$2402a8c0@riskdecisions.com> From: "John Burgess" To: "Tomcat Users List" References: <3E2D3067.5070903@simu.de> Subject: Re: EXECUTE an external .exe-file (+Parameters) that creates data-filesI want to use later in my servlet Date: Mon, 10 Feb 2003 17:12:30 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2919.6600 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600 X-Authenticated-Sender: John@riskdecisions.com X-MDRemoteIP: 192.168.2.36 X-Return-Path: john@riskdecisions.com X-MDaemon-Deliver-To: tomcat-user@jakarta.apache.org X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N I think you'll need the full (absolute) path to the exe. There is a call in the servlet api to translate a relative path to an absolute path in the server's file system but I can't remember what it is. Otherwise, put data.exe somewhere on the system path and drop the relative directory part. ----- Original Message ----- From: "Patrick Kosiol" To: "Tomcat Users List" Sent: Tuesday, January 21, 2003 11:35 AM Subject: EXECUTE an external .exe-file (+Parameters) that creates data-filesI want to use later in my 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=2 > > error=2 means imho that the File is not found. How can I execute my file > to do that, what I want. Is it possible that the process can create > files in the Tomcat folders? > > > Thx > Patrick > > > -- > To unsubscribe, e-mail: > For additional commands, e-mail: > --------------------------------------------------------------------- To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: tomcat-user-help@jakarta.apache.org