Return-Path: Delivered-To: apmail-ws-axis-user-archive@www.apache.org Received: (qmail 95025 invoked from network); 30 Nov 2009 10:19:14 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 30 Nov 2009 10:19:14 -0000 Received: (qmail 63422 invoked by uid 500); 30 Nov 2009 10:19:12 -0000 Delivered-To: apmail-ws-axis-user-archive@ws.apache.org Received: (qmail 63322 invoked by uid 500); 30 Nov 2009 10:19:12 -0000 Mailing-List: contact axis-user-help@ws.apache.org; run by ezmlm Precedence: bulk Reply-To: axis-user@ws.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list axis-user@ws.apache.org Received: (qmail 63313 invoked by uid 99); 30 Nov 2009 10:19:11 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 30 Nov 2009 10:19:11 +0000 X-ASF-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 30 Nov 2009 10:19:09 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1NF3LE-0004UG-O2 for axis-user@ws.apache.org; Mon, 30 Nov 2009 02:18:48 -0800 Message-ID: <26572260.post@talk.nabble.com> Date: Mon, 30 Nov 2009 02:18:48 -0800 (PST) From: Jens Goldhammer To: axis-user@ws.apache.org Subject: Re: How to run .exe file located inside .aar In-Reply-To: <4B0F954C.6030104@vicomtech.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Nabble-From: goldhammerdev@googlemail.com References: <4B0E9676.1040000@vicomtech.org> <4B0E98A7.204@gmail.com> <4B0F954C.6030104@vicomtech.org> Hello Kevin, try to put the path into brackets! Windows does not like path-elements with spaces in it :-( path=3D"\"" + path +"\""; Process p =3D Runtime.getRuntime().exec(path); I hope, this helps... Jens Kevin Alonso wrote: >=20 > I get the path of the file: >=20 > URL url =3D=20 > getClass().getClassLoader().getResource("ColorClusteringFroga.exe"); > =09=09=09=09 > String path =3D url.getPath(); >=20 > (Path: C:/Program Files/Apache Software Foundation/Tomcat=20 > 6.0/temp/axis2-tmp-5629 > 138317308731761.tmp/axis2593833549232759380WebService.aar!/execution.ex > e) >=20 > But when I put it to execute: >=20 > Process p =3D Runtime.getRuntime().exec(path); >=20 >=20 > I receive the following error: >=20 > java.io.IOException: Cannot run program "C:/Program": CreateProcess=20 > error=3D2, The > system cannot find the file specified >=20 > I think that it is becouse of !/ >=20 > Any idea to solve this? >=20 > Thank you in advance. >=20 > Kevin. >=20 >=20 > Deepal jayasinghe escribi=C3=B3: >> One way to do this is you can put the exe file somewhere else and you >> can define the location from a parameter (in services.xml) and then use >> the value of the parameter to load the exe file. One other way is you >> can get the URI of the exe file from axisservice, and you may try to >> execute it from that >>=20 >> classloader.getResource("execution.exe") >>=20 >> Thanks, >> Deepal >>> Hello, >>> >>> I have a web service that needs to call an .exe file and it is into >>> the .aar file. >>> >>> How can I do this? Which is the path I have to use in the instruction..= . >>> >>> Process p =3D Runtime.getRuntime().exec("execution.exe"); >>> >>> Is there another way to do this? >>> >>> Thank you in advance. >>> >>> Kevin. >>> >>=20 >>=20 >=20 >=20 --=20 View this message in context: http://old.nabble.com/How-to-run-.exe-file-lo= cated-inside-.aar-tp26530546p26572260.html Sent from the Axis - User mailing list archive at Nabble.com.