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) {
			
		}

	}
	
	/**
	 * Get properties of host computer; used for calling ipodpatcher
	 * @return
	 * 			-1 if unable to determine,
	 *			00 if Unsupported
	 * 			11 if Linux (x86),
	 * 			12 if Linux (64-bit),
	 * 			13 if Linux (PPC),
	 * 			21 if Windows
	 * 			31 if Mac OSX
	 */
	private static int getHost() {
		String bufferOS = System.getProperty("os.name");
		
		// Determine Host OS
		
			// 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;
			} else {
				err.println("Error: Operating system not supported.");
				return 00;
			}
	}

}
