Thanks to all the guys that contributed.

I finally got it working by using the following line:
Process child = Runtime.getRuntime().exec("cmd payslip.exe /c")  on WIN 2000

Thanks
Emma

-----Original Message-----
From: U. Penski [mailto:[EMAIL PROTECTED]]
Sent: Saturday, July 27, 2002 1:05 PM
To: JDJList
Subject: [jdjlist] Re: problem with Runtime.getRuntime()


Hello,

to complete the trouble-shooting list:

a) does the calling process / JVM (resp. you within a multiuser environment
of UNIX , Windows XP/NT or OS_X) have the execution right for that .exe file
?
(--> "ls" , "ls -al" / "ll" command in UNIX might clear that question with
output of  "...-x-..." attribute for that file)

b) if the path-string analysis fails in getRuntime().exec("...\\...\\...")
for any reason (e.g. "/" and "\" delimiter difference) , try to place the
.exe file **temporarily**
into the same folder as the calling process / JVM resides in (-> "work(ing)
directory") so that getRuntime().exec("payslip.exe") can work for a start.

sincerely,
U. Penski
[EMAIL PROTECTED]
http://uuhome.de/penski

----- Original Message -----
From: "Andrew Harbourne-Thomas" <[EMAIL PROTECTED]>
To: "JDJList" <[EMAIL PROTECTED]>
Sent: Friday, July 26, 2002 3:10 PM
Subject: [jdjlist] Re: problem with Runtime.getRuntime()


> A couple of other suggestions along the same route as Paul's suggestions
> 1: Instead of just "payslip.exe" try including the full path (ensuring no
> typos) to it as well.
> Eg:
> Process child = Runtime.getRuntime().exec("C:\\myDir\\payslip.exe ");
> 2: Check the path being used by the webserver.  It may be different from
> your own so this may result in the file not being found. Adjust the script
> setting this if required.
>
> If the first suggestion works this probably confirms the path issue. Also,
> if the webserver is running as a service, check that the id it runs under
> has access to the payslip file.
>
> Hope this helps,
> Andrew
> Professional Java Servlets 2.3
> http://www.amazon.com/exec/obidos/ASIN/186100561X
> http://www.amazon.co.uk/exec/obidos/ASIN/186100561X
>
> -----Original Message-----
> From: Paul Franz [mailto:[EMAIL PROTECTED]]
> Sent: 26 July 2002 13:06
> To: JDJList
> Subject: [jdjlist] Re: problem with Runtime.getRuntime()
>
> I think error 2 is not found. Are you sure that the payslip.exe is in the
> PATH?
>
> Paul Franz
> ----- Original Message -----
> From: "Emmanuel Eze" <[EMAIL PROTECTED]>
> To: "JDJList" <[EMAIL PROTECTED]>
> Sent: Friday, July 26, 2002 4:48 AM
> Subject: [jdjlist] problem with Runtime.getRuntime()
>
>
> > Hi All,
> >
> > The following error is generated from my JSP page when I attempt to
> execute
> > an executable file using :-
> > Process child = Runtime.getRuntime().exec("payslip.exe");
> >
> > Exception thrown: java.io.IOException: CreateProcess: payslip.exe
error=2
> >
> > Can anyone assit me?
> >
> > Emma
> >
> >
> > To change your membership options, refer to:
> > http://www.sys-con.com/java/list.cfm
> >
>
>
> To change your membership options, refer to:
> http://www.sys-con.com/java/list.cfm
>
>
> To change your membership options, refer to:
> http://www.sys-con.com/java/list.cfm
>


To change your membership options, refer to:
http://www.sys-con.com/java/list.cfm


To change your membership options, refer to:
http://www.sys-con.com/java/list.cfm

Reply via email to