ErrorHandler errorHandler = new ErrorHandler();
expect.add(errorHandler);
try {
int exitCode = expect.exec(60*1000);
// exit codes are defined in juti.h (see auth_result_t)
// 0 means success, 1 means invalid username of password,
// 2 means error
switch(exitCode) {