Reputation: 1105
I am making a GUI in Java, which starts and stops services. I am using the following code to start the service:
Runtime runtime = Runtime.getRuntime();
Process exec = runtime.exec(serviceExecutablePath);
where serviceExecutablePath
is
nohup /usr/local/Services/Deployable/AccountNameCleanServiceJar/AccountNameCleanService.sh >/dev/null
I am using Tomcat as my server. Every time I start a service it gets started but after some time stops by itself.
However on running the same command from Unix console its running fine. I am stuck why this is happening, can anyone help me in this?
Upvotes: 1
Views: 223