java - Restart Unix service -
i have ubuntu in machine have installed snmpd. start stop use below command:
- service snmpd start
- service snmpd stop
now have execute comments java. have tried not work.
runtime.getruntime.exe("service snmpd start") so, tell me how execute service of linux suse through java?
any great
suddenly people started talking link instead of question. solution easy. 1 need wait process complete. see below code.
process process = runtime.getruntime().exec("service snmpd start"); process.waitfor();
Comments
Post a Comment