import static java.lang.System.err;


public class Sandbox {

	private static void quickExit() {
		err.println("Now exiting...");
		System.exit(1);
	}
	
	public static void main(String[] args) {
		
		
		ProcessBuilder foobar;
		foobar = new ProcessBuilder();
		foobar.command("calc.exe");
		try {
			foobar.start();
		} catch (java.io.IOException e) {
			
		}

	}
	
	private static int runiPodPatcher() {
		ProcessBuilder ipodpatcher;
		switch (getHost()) {
			case -1: break;
			
		}
		err.println("Error: Unable to patch iPod.");
		return -1;
	}
	
	/**
	 * Get properties of host computer. Used for calling ipodpatcher binary.
	 * @return
	 * 		-1 if unable to determine, <br>
	 *		00 if Unsupported, <br>
	 * 		11 if Linux (x86), <br>
	 * 		12 if Linux (64-bit), <br>
	 * 		13 if Linux (PPC), <br>
	 * 		21 if Windows, <br>
	 * 		31 if Mac OSX
	 */
	private static int getHost() {
		
		// Operating System
		String bufferOS = System.getProperty("os.name");
		
		// Undeterminable
		if (bufferOS == null) {
			err.println("Error: Unable to determine host operating system.");
			return -1;
		} else
	
		// Linux
		if (bufferOS.indexOf("Linux")!=-1) {
			// Architechture
			String bufferArch = System.getProperty("os.arch");
			if (bufferArch.indexOf("ppc")!=-1) {
				return 13;
			} else if (bufferArch.indexOf("64")!=-1) {
				return 12;
			} else if (bufferArch.indexOf("86")!=-1) {
				return 11;
			} else {
				return 11; // Hope this works, not sure though
			}
		} else
			
		// Windows
		if (bufferOS.indexOf("Windows")!=-1) {
			return 21;
		} else
		
		// Mac OS X	
		if (bufferOS.indexOf("Mac OS X")!=-1) {
			return 31;
			
		// Unsupported
		} else {
			err.println("Error: Operating system not supported.");
			return 00;
		}
	}

}
