Reputation: 1499
I am developing an application which displays the running processes in linux and if any of the process is not running start that process. All the actions should be performed by firing linux commands. Also create a log text file and insert the log in the processlog table in database.
Java code sample preferred. Urgent please.
Thanks In Advance.
Upvotes: 2
Views: 694
Reputation: 3015
ProcessBuilder
is exactly what you need. Take a look at docs -
http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/ProcessBuilder.html
Upvotes: 2