I am working on an application an have an issue about running shell command from java application. here is the code:
public String execRuntime(String cmd) {
I recall that the an overload of exec method provides a parameter for the arguments seperately. You need to use that
Yup. Here is it
public Process exec(String[] cmdarray)
throws IOException
Just make the command line and all arguments Seperate elements of the String array
first make a string
String cmd="/export/home/test/myapp -T \"some argument\"";
then run cmd in proc