public static void main(String[] argv) { Shake myShake = null; if (argv.length >= 2) { // At least two arguments are needed in order to start the proxy if (argv.length == 2) // Only the neccessary parameters EventHeapName and COMPort were supplied. myShake = new Shake(argv[0], "", argv[1]); else if (argv.length >= 3) // All parameters were supplied myShake = new Shake(argv[0], argv[2], argv[1]); myShake.run(); } else { System.out.println( "\nUsage: java Shake <Event Heap IP> <Comm Port> [ProxyID] \n" + "<Comm Port> = the serial port address for the phone e.g. /dev/tty.Nokia6600, COM3\n" + "[ProxyID] = an optional parameter to be checked in the events received and sent in events generated e.g. proxy1\n"); } }