I need to start tomcat, nginx, kafka etc from scala or java program, I am able to check through java program that if they are running or not using `ps-ef| grep nameofservice` but if they are not running I want them to start itself from java or scala program, I tried this for tomcat

```
val pr = Runtime.getRuntime.exec(Array[String]("/home/administrator/Desktop/apache-tomcat-8.0.5/bin","-c","echo def123@| sudo -S startup.sh"))

```

but it's not working.