Groups > IBM > WebSphere Studio Device Developer > Re: Runtime.exec() doesn't work.




Runtime.exec() doesn't work.

Runtime.exec() doesn't work.
Mon, 26 Nov 2007 16:36:05 +000
I did see Andrew's link regarding this issue:

http://www-1.ibm.com/support/docview.wss?rs=758&context=SSSUAS&q1=runtim
e+exec&uid=swg21182280&loc=en_US&cs=utf-8&lang=en

I'm using Windows Mobile 5.0, and given the following stack trace, I'm 
assuming this hasn't, nor won't be resolved?  Does anyone have a 
workaround?  I've never used JNI, is that support on WM 5.0 and J9?  If I 
do have to write C code, Do I have to use Microsoft's Visual Studio to 
acheive what I thought was a simple task?

Here's the trace:

java.io.IOException: Unable to start program
        at com.ibm.oti.lang.SystemProcess.create(SystemProcess.java:126)
        at java.lang.Runtime.exec(Runtime.java:99)
        at java.lang.Runtime.exec(Runtime.java:69)
        at java.lang.Runtime.exec(Runtime.java:43)
        at com.penntraffic.mobile.JMenu$4.actionPerformed(JMenu.java:629)
        at java.awt.Button.processActionEvent(Button.java:252)
        at java.awt.Button.processEvent(Button.java:221)
        at java.awt.Component.dispatchEventImpl(Component.java:2395)
        at java.awt.Component.dispatchEvent(Component.java:2337)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:220)
        at java.awt.EventQueue.eventLoop(EventQueue.java:245)
        at java.awt.EventQueue$EventDispatchThread.run(EventQueue.java:47)

TIA,
Post Reply
Re: Runtime.exec() doesn't work.
Wed, 28 Nov 2007 16:34:11 -070
JRancier@penntraffic.com wrote:
> I did see Andrew's link regarding this issue:
> 
>
http://www-1.ibm.com/support/docview.wss?rs=758&context=SSSUAS&q1=runtim
e+exec&uid=swg21182280&loc=en_US&cs=utf-8&lang=en
> 
> I'm using Windows Mobile 5.0, and given the following stack trace, I'm 
> assuming this hasn't, nor won't be resolved?  Does anyone have a 
> workaround?  I've never used JNI, is that support on WM 5.0 and J9?  If I 
> do have to write C code, Do I have to use Microsoft's Visual Studio to 
> acheive what I thought was a simple task?
> 
> Here's the trace:
> 
> java.io.IOException: Unable to start program
>         at com.ibm.oti.lang.SystemProcess.create(SystemProcess.java:126)
>         at java.lang.Runtime.exec(Runtime.java:99)
>         at java.lang.Runtime.exec(Runtime.java:69)
>         at java.lang.Runtime.exec(Runtime.java:43)
>         at com.penntraffic.mobile.JMenu$4.actionPerformed(JMenu.java:629)
>         at java.awt.Button.processActionEvent(Button.java:252)
>         at java.awt.Button.processEvent(Button.java:221)
>         at java.awt.Component.dispatchEventImpl(Component.java:2395)
>         at java.awt.Component.dispatchEvent(Component.java:2337)
>         at java.awt.EventQueue.dispatchEvent(EventQueue.java:220)
>         at java.awt.EventQueue.eventLoop(EventQueue.java:245)
>         at java.awt.EventQueue$EventDispatchThread.run(EventQueue.java:47)

Yes, unfortunately you'll need JNI. In order to pass TCK, System.exec() 
has to be able to redirect stdin/stdout/stderr - something not possible 
on Windows Mobile. So the only way to pass is to throw the exception.

	Andrew Jr.

======================================================================
IBM Phoenix Labs (OTI)
2929 North Central Avenue
Post Reply
about | contact