Executing shell commands from Java
Posted
by Lauren?iu Dascalu
on Stack Overflow
See other posts from Stack Overflow
or by Lauren?iu Dascalu
Published on 2010-06-17T14:04:09Z
Indexed on
2010/06/17
15:33 UTC
Read the original article
Hit count: 331
Hello,
I'm trying to execute a shell command from a java application, on the GNU/Linux platform. The problem is that the script, that calls another java application, never ends, although it runs successfully from bash. I tried to debug it:
(gdb) bt #0 0xb773d422 in __kernel_vsyscall () #1 0xb7709b5d in pthread_join (threadid=3063909232, thread_return=0xbf9cb678) at pthread_join.c:89 #2 0x0804dd78 in ContinueInNewThread () #3 0x080497f6 in main ()
I tried with: ProcessBuilder(); and Runtime.getRuntime().exec(cmd);
Looks like it waits for something to finish. Any ideas?
Thanks, Lauren?iu
© Stack Overflow or respective owner