private static void submit(String[] args) throws IOException, ClassNotFoundException, IllegalArgumentException, IllegalAccessException, InvocationTargetException, SecurityException, NoSuchMethodException {
		// TODO Auto-generated method stub
		//hadoop mapred submit jar /usr/foo.jar package.ClassName inputPath outputPath
		String type = args[3];
		String jarPath = args[4];
		String mainClassName = args[5];
		String intputPath = args[6];
		String outoutPath = args[7];
		
		JobClient.jarPath = jarPath;
		
		JarFile jarFile = new JarFile(jarPath);
		Enumeration<JarEntry> e = jarFile.entries();
		
		URL[] urls = { new URL("jar:file:" + jarPath +"!/") };
		ClassLoader cl = URLClassLoader.newInstance(urls);
		
		Class<?> mainClass = null;
		
		while (e.hasMoreElements()) {
            
			JarEntry je = e.nextElement();
            
			if(je.isDirectory() || !je.getName().endsWith(".class")){
                continue;
            }
            
            String className = je.getName().substring(0, je.getName().length() - 6);
            className = className.replace('/', '.');
            if (className.equals(mainClassName)) {
            	mainClass =  cl.loadClass(className);
            }
        }
		
	    Method m = mainClass.getMethod("main", new Class[] {String[].class});
	    m.setAccessible(true);
	    
	    int mods = m.getModifiers();
	    
	    if (m.getReturnType() != void.class || !Modifier.isStatic(mods) ||
	        !Modifier.isPublic(mods)) {
	        throw new NoSuchMethodException("main");
	    }
	    
	    String[] newArgs = new String[args.length - 6];
	    newArgs = Arrays.copyOfRange(args, 6, args.length);
	    System.out.println("DEBUG Utility.subit(): newArgs = " + Arrays.toString(newArgs));
	    m.invoke(null, new Object[] { newArgs });
		
	}