public static void main(String... args) {
OptionsAndArgs options;
try {
options = new OptionsAndArgs(CommandDispatcher.getAvailableCommands(),args);
VirtualMachineHandler vmHandler = new VirtualMachineHandler(options);
CommandDispatcher dispatcher = new CommandDispatcher(options);
// Attach a VirtualMachine to a given PID (if PID is given)
Object vm = vmHandler.attachVirtualMachine();
// Dispatch command
int exitCode = 0;
try {
exitCode = dispatcher.dispatchCommand(vm,vmHandler);
} catch (InvocationTargetException e) {
throw new ProcessingException("InvocationTargetException",e,options);
} catch (NoSuchMethodException e) {
throw new ProcessingException("Internal: NoSuchMethod",e,options);
} catch (IllegalAccessException e) {