#1 Need for call and wait()

closed
nobody
None
5
2007-02-14
2006-10-13
Team SBS
No

Dear Lars,

as described int the documentation, the jstub native
stubs are very simple:

int main( int argc char** argv)
{
system( "java -jar %s", (char*)&argv[0]);
return 0;
}

I have a simple command line program, name is
"caller.exe", which should be called, but should WAIT
and not return to command line and report the exitcode.

The jstub returns after calling the execute command and
returns 0 as exitcode, but the jar as a different exitcode.

Maybe I did something wrong. Can you help?

MANY THANKS!!!

Andreas

Discussion

  • Team SBS

    Team SBS - 2006-10-13

    Logged In: YES
    user_id=1341104

    Example:

    Ant configuration:

    <jstub
    icon="${src_oem}/oem/icon.ico"
    archive="${dest_jar}/caller.jar"
    mode="win32-console"
    execute="java -jar caller.exe"
    output="${dest_release}/${target.windows32}/caller.exe"
    />

    Calling directly from command line:

    C:\TEMP>java -jar caller.exe -h localhost -p 7778 -w TEST

    Message from caller!

    C:\TEMP>

    Calling with jstub:

    C:\SVNTEMP\ET\Professional\devel\release\windows32\bin>caller
    -h localhost -p 7778 -w TEST c:\AUTOEXEC.BAT

    C:\TEMP>Message from caller!

    As you see, caller.exe first returns to the prompt and then
    prints out the message from the caller.exe

     
  • Team SBS

    Team SBS - 2006-12-07

    Logged In: YES
    user_id=1341104
    Originator: YES

    Any help appreciated ... any response? Thanks!

     
  • Arne Plöse

    Arne Plöse - 2007-02-14

    Logged In: YES
    user_id=1307078
    Originator: NO

    fixed in current svn.
    if you use not the console-mode the programm will block and return with the proper error code.

    Arne

     
  • Arne Plöse

    Arne Plöse - 2007-02-14
    • status: open --> closed
     

Log in to post a comment.