Hello all, This is my first java application since college (years ago..)
What it basically needs to do, is verify that it can connect to a server, and once it is connected, run a series of AIX commands to verify that certain processes are running, and if they aren't running, it needs to start them.
so far, I have been able to get the program to connect to the database but I am at a roadblock. Here's what I have so far..
try {
Connection conn = null;
Class.forName("COM.ibm.db2.jdbc.app.DB2Driver").newInstance();
conn = (Connection) DriverManager.getConnection("jdbc:db2:" + SERVER, USERID, PWD);
Process p = Runtime.getRuntime().exec(EXECSTRING);
System.out.println ("Connection Status: " + conn);
System.out.println (p);
return conn;
EXECSTRING I have initialized as
private static String EXECSTRING ="ps -ef | grep <process>";
I feel like I am spinning my wheels with this, and I am not sure if I am remotely close. Any assistance would be appreciated.