Topic
  • 1 reply
  • Latest Post - ‏2007-11-28T23:34:11Z by SystemAdmin
SystemAdmin
SystemAdmin
9394 Posts

Pinned topic Runtime.exec() doesn't work.

‏2007-11-26T16:36:05Z |
I did see Andrew's link regarding this issue:

http://www-1.ibm.com/support/docview.wss?rs=758&context=SSSUAS&q1=runtime+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,
Jeff
Updated on 2007-11-28T23:34:11Z at 2007-11-28T23:34:11Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    9394 Posts

    Re: Runtime.exec() doesn't work.

    ‏2007-11-28T23:34:11Z  
    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=runtime+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
    Phoenix, Arizona, USA 85012