Executing shell commands from Java
- by Lauren?iu Dascalu
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