|
|
|
JAVA Start/Stop Service ขอดูตัวอย่างหน่อยครับ หาข้อมูลไม่เจอสักที รบกวนด้วยครับ |
|
|
|
|
|
|
|
Code (Java)
Execute scripts using Runtime.exec(String[] args)
Code (Java)
String[] scriptStart = {"cmd.exe", "/c", "sc", "start", SERVICE_NAME};//to start service
String[] scriptStop = {"cmd.exe", "/c", "sc", "stop", SERVICE_NAME};//to stop service
Code (Java)
Runtime.exec(scriptStart);
Runtime.exec(scriptStop);
|
|
|
|
|
Date :
2016-01-19 11:21:22 |
By :
mr.win |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 00
|