public static void main(String[] argv) {

        Properties param = new Properties();
        //String midlet = null;
        //String jadfile = null;

        for (int i = 0; i < argv.length; i++) {

            if (argv[i].startsWith("-")) {
                param.put(argv[i].substring(1), argv[i + 1]);
                i++;
            }
            else{
            int p = argv[i].indexOf(".jad");
            if (p!=-1 && p == argv[i].length() - 4)
                param.put("jad", argv[i]);
            else
                param.put("midlet", argv[i]);
            }
        }

        if (param.get("midlet") == null && param.get("jad") == null) {
            param.put("jam", "org.me4se.impl.jam.MIDletSuiteManager");
            param.put("midlet", "org.me4se.impl.jam.MIDletSuiteManager");
        }

        new ApplicationManager(null, param).launch(null);
        ApplicationManager.manager.start();
    }