Content received from: http://JavaFAQ.nu/java-article238.html


I try to call the Runtime.exec() command by passing it an array of strings.
Friday, October 24, 2003 (00:00:00)

Posted by jalex

Question: I try to call the Runtime.exec() command by passing it an array of strings.

The problem is that I need to use "&" in my command. It runs perfectly on shell prompt but not by Runtime.exec(). Java cuts all everything away after that sign, so my command is incomplete.

Answer: No clear explanation to such behavior. Use workaround:
write your command into file (shell script) and then run this script. It will work Smile

*******************************************
Our older tips: March 22, 2001 - October 21, 2002 READ HERE
All published and not published on the site tips read HERE