Is it possible to use the JarSigner class to sign a jar file within java? Currently I am using:
String args[] = {"-keystore", keystore, "-storepass", password, jar, keyname};
JarSigner js = new JarSigner();
js.run(args);
but if anything fails, the js.run void will call a System.exit(-1) causing my entire application to crash. I was thinking about running that inside of a thread, joining it until it completes, and checking for the return code. Just seeing if there is a more formal way of doing that... Any help would be appreciated.