It is the correct method
Did you set
yes, i got no problem when starting jboss in command prompt.
well what errors is it giving you?
Here is the program and the error message
I think it's just because your run.bat is not started in the jboss directory.
try to use :
public Process exec(String cmdarray,
with dir = jboss/bin directory