ok, I figured it out, I am using Python script to restart jboss service on windows & linux, call python file from java code,
I also tried some other java based open source packages named restarts.exe but python response was better,
later I figured out I can also use C/C++ code and integrate dll's with JNI