Insufficient arguments

Hello all!

I’m stumped. I have the following code and I don’t know why it’s giving me an error message.

I’m calling the server task in the java agent and I’m using

Runtime rt = Runtime.getRuntime();

rt.exec("server -c "dbcache flush" " );

It’s giving me an insufficient argument error.

"dbcache insufficient arguement.

I’m not sure why I’m gettiing this error. Can someone please tell me why? and how should I call it? thanks so much!

Subject: Don’t know, but I would use sendConsoleCommand instead.

import lotus.domino.*;

public class JavaAgent extends AgentBase {

RichTextStyle rtstyle = null;

public void NotesMain() {

try {
  Session session = getSession();
  AgentContext agentContext = session.getAgentContext();

  // (Your code goes here)
  String server = "server1/east/acme";
  String command = "dbcache flush";
  System.out.println(
    session.sendConsoleCommand(server, command));

} catch(Exception e) {
  e.printStackTrace();
}

}
}