axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kevin Alonso <>
Subject Re: How to run .exe file located inside .aar
Date Fri, 27 Nov 2009 09:01:00 GMT
I get the path of the file:

URL url = 
String path = url.getPath();

(Path: C:/Program Files/Apache Software Foundation/Tomcat 

But when I put it to execute:

Process p = Runtime.getRuntime().exec(path);

  I receive the following error: Cannot run program "C:/Program": CreateProcess 
error=2, The
  system cannot find the file specified

I think that it is becouse of !/

Any idea to solve this?

Thank you in advance.


Deepal jayasinghe escribió:
> 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
> classloader.getResource("execution.exe")
> 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 = Runtime.getRuntime().exec("execution.exe");
>> Is there another way to do this?
>> Thank you in advance.
>> Kevin.

View raw message